mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-27 03:30:50 +00:00
Fix confusion between nodes and players in ping updating code and PT_PING packet sending code
This commit is contained in:
parent
2223283208
commit
3d86e7135d
1 changed files with 4 additions and 4 deletions
|
@ -4529,8 +4529,8 @@ static inline void PingUpdate(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//send out our ping packets
|
//send out our ping packets
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXNETNODES; i++)
|
||||||
if (playeringame[i])
|
if (nodeingame[i])
|
||||||
HSendPacket(i, true, 0, sizeof(INT32) * MAXPLAYERS);
|
HSendPacket(i, true, 0, sizeof(INT32) * MAXPLAYERS);
|
||||||
|
|
||||||
pingmeasurecount = 1; //Reset count
|
pingmeasurecount = 1; //Reset count
|
||||||
|
@ -4571,9 +4571,9 @@ void NetUpdate(void)
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
// update node latency values so we can take an average later.
|
// update node latency values so we can take an average later.
|
||||||
for (i = 0; i < MAXNETNODES; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
if (playeringame[i])
|
if (playeringame[i])
|
||||||
realpingtable[i] += G_TicsToMilliseconds(GetLag(i));
|
realpingtable[i] += G_TicsToMilliseconds(GetLag(playernode[i]));
|
||||||
pingmeasurecount++;
|
pingmeasurecount++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue