From 1f87cbe040449bdc098a64a71788d62151b2d6de Mon Sep 17 00:00:00 2001 From: Tater Date: Mon, 30 Sep 2024 13:26:55 -0500 Subject: [PATCH] fix rare stuttering issue on low prediction --- src/game/client/components/controls.cpp | 3 ++- src/game/client/gameclient.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index b544329ee6e..54552472a58 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -492,9 +492,10 @@ bool CControls::CheckNewInput() TestInput.m_TargetY *= m_pClient->m_Camera.m_Zoom; } + m_FastInput = TestInput; + if (NewInput) { - m_FastInput = TestInput; return true; } return false; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index f0c3e4d243e..b246ab126a1 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -316,11 +316,11 @@ void CGameClient::OnInit() if(GIT_SHORTREV_HASH) { - str_format(m_aDDNetVersionStr, sizeof(m_aDDNetVersionStr), "%s %s (%s)", GAME_NAME, GAME_RELEASE_VERSION, GIT_SHORTREV_HASH); + str_format(m_aDDNetVersionStr, sizeof(m_aDDNetVersionStr), "%s %s (%s)", CLIENT_NAME, GAME_RELEASE_VERSION, GIT_SHORTREV_HASH); } else { - str_format(m_aDDNetVersionStr, sizeof(m_aDDNetVersionStr), "%s %s", GAME_NAME, GAME_RELEASE_VERSION); + str_format(m_aDDNetVersionStr, sizeof(m_aDDNetVersionStr), "%s %s", CLIENT_NAME, GAME_RELEASE_VERSION); } // set the language @@ -2209,7 +2209,7 @@ void CGameClient::OnPredict() m_PrevPredictedWorld.CopyWorld(&m_PredictedWorld); m_PredictedPrevChar = pLocalChar->GetCore(); } - if(Tick == FinalTick - (1 - g_Config.m_ClFastInputOthers)) + if(Tick == FinalTick - std::max(g_Config.m_ClFastInput - g_Config.m_ClFastInputOthers, 0)) { for(int i = 0; i < MAX_CLIENTS; i++) if(CCharacter *pChar = m_PredictedWorld.GetCharacterById(i)) @@ -2246,7 +2246,7 @@ void CGameClient::OnPredict() { m_PredictedChar = pLocalChar->GetCore(); } - if (Tick == FinalTick - (1 - g_Config.m_ClFastInputOthers)) + if(Tick == FinalTick - std::max(g_Config.m_ClFastInput - g_Config.m_ClFastInputOthers, 0)) { for(int i = 0; i < MAX_CLIENTS; i++) if(CCharacter *pChar = m_PredictedWorld.GetCharacterById(i))