mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Clean up a bit
This commit is contained in:
parent
a1049267c3
commit
9dc63ed429
|
@ -1568,37 +1568,45 @@ void CGameClient::OnPredict()
|
|||
}
|
||||
|
||||
// move all players and quantize their data
|
||||
if(g_Config.m_ClAntiPingPlayers)
|
||||
{
|
||||
for(int h = 0; h < 3; h++)
|
||||
{
|
||||
if(h == 1)
|
||||
{
|
||||
if(World.m_apCharacters[m_Snap.m_LocalClientID])
|
||||
{
|
||||
World.m_apCharacters[m_Snap.m_LocalClientID]->Move();
|
||||
World.m_apCharacters[m_Snap.m_LocalClientID]->Quantize();
|
||||
}
|
||||
}
|
||||
else
|
||||
for(int c = 0; c < MAX_CLIENTS; c++)
|
||||
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && ((h == 0 && IsWeaker[g_Config.m_ClDummy][c]) || (h == 2 && !IsWeaker[g_Config.m_ClDummy][c])))
|
||||
{
|
||||
World.m_apCharacters[c]->Move();
|
||||
World.m_apCharacters[c]->Quantize();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int c = 0; c < MAX_CLIENTS; c++)
|
||||
{
|
||||
if(!World.m_apCharacters[c])
|
||||
continue;
|
||||
World.m_apCharacters[c]->Move();
|
||||
World.m_apCharacters[c]->Quantize();
|
||||
}
|
||||
}
|
||||
if(g_Config.m_ClAntiPingPlayers)
|
||||
{
|
||||
// Everyone with weaker hook
|
||||
for(int c = 0; c < MAX_CLIENTS; c++)
|
||||
{
|
||||
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && IsWeaker[g_Config.m_ClDummy][c])
|
||||
{
|
||||
World.m_apCharacters[c]->Move();
|
||||
World.m_apCharacters[c]->Quantize();
|
||||
}
|
||||
}
|
||||
|
||||
// Us
|
||||
if(World.m_apCharacters[m_Snap.m_LocalClientID])
|
||||
{
|
||||
World.m_apCharacters[m_Snap.m_LocalClientID]->Move();
|
||||
World.m_apCharacters[m_Snap.m_LocalClientID]->Quantize();
|
||||
}
|
||||
|
||||
// Everyone with stronger hook
|
||||
for(int c = 0; c < MAX_CLIENTS; c++)
|
||||
{
|
||||
if(c != m_Snap.m_LocalClientID && World.m_apCharacters[c] && !IsWeaker[g_Config.m_ClDummy][c])
|
||||
{
|
||||
World.m_apCharacters[c]->Move();
|
||||
World.m_apCharacters[c]->Quantize();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int c = 0; c < MAX_CLIENTS; c++)
|
||||
{
|
||||
if(!World.m_apCharacters[c])
|
||||
continue;
|
||||
World.m_apCharacters[c]->Move();
|
||||
World.m_apCharacters[c]->Quantize();
|
||||
}
|
||||
}
|
||||
|
||||
// check if we want to trigger effects
|
||||
if(Tick > m_LastNewPredictedTick[g_Config.m_ClDummy])
|
||||
|
|
Loading…
Reference in a new issue