Predict directinput order for dummy and main

This commit is contained in:
trml 2020-04-19 12:50:37 +02:00
parent cae7fad901
commit fe1a7fb1e0

View file

@ -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)