diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index d0fd13047..385077533 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -255,14 +255,7 @@ int CControls::SnapInput(int *pData) else if(m_pClient->m_Menus.IsActive()) m_InputData[g_Config.m_ClDummy].m_PlayerFlags = PLAYERFLAG_IN_MENU; else - { - if(m_InputData[g_Config.m_ClDummy].m_PlayerFlags == PLAYERFLAG_CHATTING) - { - if(GameClient()->m_GameInfo.m_BugDDRaceInput) - ResetInput(g_Config.m_ClDummy); - } m_InputData[g_Config.m_ClDummy].m_PlayerFlags = PLAYERFLAG_PLAYING; - } if(m_pClient->m_Scoreboard.Active()) m_InputData[g_Config.m_ClDummy].m_PlayerFlags |= PLAYERFLAG_SCOREBOARD; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index cc4685e87..cb84331aa 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -2253,6 +2253,7 @@ void CGameClient::UpdatePrediction() m_GameWorld.m_WorldConfig.m_UseTuneZones = m_GameInfo.m_PredictDDRaceTiles; m_GameWorld.m_WorldConfig.m_PredictFreeze = g_Config.m_ClPredictFreeze; m_GameWorld.m_WorldConfig.m_PredictWeapons = AntiPingWeapons(); + m_GameWorld.m_WorldConfig.m_BugDDRaceInput = m_GameInfo.m_BugDDRaceInput; // always update default tune zone, even without character if(!m_GameWorld.m_WorldConfig.m_UseTuneZones) diff --git a/src/game/client/prediction/entities/character.cpp b/src/game/client/prediction/entities/character.cpp index b646b7bad..81af8539c 100644 --- a/src/game/client/prediction/entities/character.cpp +++ b/src/game/client/prediction/entities/character.cpp @@ -494,8 +494,12 @@ void CCharacter::GiveNinja() void CCharacter::OnPredictedInput(CNetObj_PlayerInput *pNewInput) { // skip the input if chat is active - if(pNewInput->m_PlayerFlags & PLAYERFLAG_CHATTING) + if(GameWorld()->m_WorldConfig.m_BugDDRaceInput && pNewInput->m_PlayerFlags & PLAYERFLAG_CHATTING) + { + // save reseted input + mem_copy(&m_SavedInput, &m_Input, sizeof(m_SavedInput)); return; + } // copy new input mem_copy(&m_Input, pNewInput, sizeof(m_Input)); @@ -511,11 +515,10 @@ void CCharacter::OnPredictedInput(CNetObj_PlayerInput *pNewInput) void CCharacter::OnDirectInput(CNetObj_PlayerInput *pNewInput) { // skip the input if chat is active - if(pNewInput->m_PlayerFlags & PLAYERFLAG_CHATTING) + if(GameWorld()->m_WorldConfig.m_BugDDRaceInput && pNewInput->m_PlayerFlags & PLAYERFLAG_CHATTING) { // reset input ResetInput(); - return; } diff --git a/src/game/client/prediction/gameworld.h b/src/game/client/prediction/gameworld.h index c10ef2d77..bb037fd91 100644 --- a/src/game/client/prediction/gameworld.h +++ b/src/game/client/prediction/gameworld.h @@ -72,6 +72,7 @@ public: bool m_PredictDDRace; bool m_IsSolo; bool m_UseTuneZones; + bool m_BugDDRaceInput; } m_WorldConfig; bool m_IsValidCopy; diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index e8745ec10..11f895df7 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -538,10 +538,6 @@ void CPlayer::OnDirectInput(CNetObj_PlayerInput *NewInput) if(m_PlayerFlags & PLAYERFLAG_CHATTING) return; - // reset input - if(m_pCharacter) - m_pCharacter->ResetInput(); - m_PlayerFlags = NewInput->m_PlayerFlags; return; }