mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Don't let old inputs overwrite current tick input
This commit is contained in:
parent
a202751ada
commit
3eefa68534
|
@ -1666,6 +1666,12 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
|||
if(IntendedTick <= Tick())
|
||||
IntendedTick = Tick() + 1;
|
||||
|
||||
// Check once again that we are not overriding an input the client has already sent
|
||||
// This is a workaround while the above code is still able to change IntendedTick
|
||||
BufferPosition = IntendedTick % 200;
|
||||
if(m_aClients[ClientId].m_aInputs[BufferPosition].m_GameTick == IntendedTick)
|
||||
return;
|
||||
|
||||
CClient::CInput *pInput = &m_aClients[ClientId].m_aInputs[BufferPosition];
|
||||
pInput->m_GameTick = IntendedTick;
|
||||
|
||||
|
|
Loading…
Reference in a new issue