Page MenuHomeFeedback Tracker

Hand FSM Desync
Closed, DuplicatePublic

Description

If the player is in the air while manipulating the hand slot, this will cause the handfsm to desynchronization.
The bug occurs quite often and is terribly annoying,
Only death or reconnection to the server helps.

Demonstration: youtube

Logs code:

3_Game
modded class HumanInventoryWithFSM
{
	int GetCurrentState()
	{
		if (m_FSM.GetCurrentState() == m_Empty)
			return 0;
		if (m_FSM.GetCurrentState() == m_Equipped)
			return 1;
		return -1;
	}

	string GetStateName(int i)
	{
		switch(i)
		{
			case 0: return "Empty";
			case 1: return "Equipped";
		}

		return "Unknown";
	}

	string GetCurrentStateName()
	{
		return GetStateName(GetCurrentState());
	}
}
4_World
modded class PlayerBase
{
	override void OnCommandFallStart()
	{
		super.OnCommandFallStart();

		Print("OnCommandFallStart");
	}

	override void OnCommandFallFinish()
	{
		super.OnCommandFallFinish();

		string instancePrefix = "[SERVER]";
		if (GetGame().IsClient())
			instancePrefix = "[CLIENT]";

		Print("OnCommandFallFinish");
		PrintFormat("%2 Hand fsm state %1", GetDayZPlayerInventory().GetCurrentStateName(), instancePrefix);
	}

Server Logs:

Client Logs:

If the number of calls to these methods ("OnCommandFallStart", "OnCommandFallFinish") matches on the server and on the client, desynchronization can still occur, as in this case

Details

Severity
Major
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 10
Category
General

Event Timeline

Armor created this task.Mar 13 2024, 8:29 AM
Geez changed the task status from New to Awaiting internal Testing.Mar 13 2024, 9:24 AM
Mars22 added a subscriber: Mars22.Mar 13 2024, 10:17 AM

I have the same bug{F3883119}

jobthe added a subscriber: jobthe.Mar 13 2024, 10:21 AM

This happens quite often for players

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++