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