diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 5da281de1..1149164c2 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -685,10 +685,11 @@ void CCharacter::SetEmote(int Emote, int Tick) void CCharacter::OnPredictedInput(CNetObj_PlayerInput *pNewInput) { // check for changes - if(mem_comp(&m_Input, pNewInput, sizeof(CNetObj_PlayerInput)) != 0) + if(mem_comp(&m_SavedInput, pNewInput, sizeof(CNetObj_PlayerInput)) != 0) m_LastAction = Server()->Tick(); // copy new input + mem_copy(&m_SavedInput, pNewInput, sizeof(m_SavedInput)); mem_copy(&m_Input, pNewInput, sizeof(m_Input)); m_NumInputs++; @@ -1994,6 +1995,7 @@ void CCharacter::SendZoneMsgs() void CCharacter::DDRaceTick() { + mem_copy(&m_Input, &m_SavedInput, sizeof(m_Input)); m_Armor=(m_FreezeTime >= 0)?10-(m_FreezeTime/15):0; if(m_Input.m_Direction != 0 || m_Input.m_Jump != 0) m_LastMove = Server()->Tick(); diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index c22908405..cc4f4fdc0 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -130,6 +130,7 @@ private: // input CNetObj_PlayerInput m_PrevInput; CNetObj_PlayerInput m_Input; + CNetObj_PlayerInput m_SavedInput; int m_NumInputs; int m_Jumped;