mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Predict directinput order for dummy and main
This commit is contained in:
parent
cae7fad901
commit
fe1a7fb1e0
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue