From fe1a7fb1e0415e56277c824cb809c6d7a060bda4 Mon Sep 17 00:00:00 2001 From: trml Date: Sun, 19 Apr 2020 12:50:37 +0200 Subject: [PATCH] Predict directinput order for dummy and main --- src/game/client/gameclient.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index e9147a8b7..9c8a2f3e6 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -1597,9 +1597,13 @@ void CGameClient::OnPredict() // apply inputs and tick CNetObj_PlayerInput *pInputData = (CNetObj_PlayerInput*) Client()->GetDirectInput(Tick, m_IsDummySwapping); CNetObj_PlayerInput *pDummyInputData = !pDummyChar ? 0 : (CNetObj_PlayerInput*) Client()->GetDirectInput(Tick, m_IsDummySwapping^1); + bool DummyFirst = pInputData && pDummyInputData && pDummyChar->GetCID() < pLocalChar->GetCID(); + + if(DummyFirst) + pDummyChar->OnDirectInput(pDummyInputData); if(pInputData) pLocalChar->OnDirectInput(pInputData); - if(pDummyInputData) + if(pDummyInputData && !DummyFirst) pDummyChar->OnDirectInput(pDummyInputData); m_PredictedWorld.m_GameTick = Tick; if(pInputData)