mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-23 16:32:36 +00:00
Base gentlemen delay on lowest average
Was previously based on the delay at the moment of calculation, which may fluctuate. I changed it to use the average because the number was flickering in the HUD.
This commit is contained in:
parent
8103bd21c1
commit
3e5f6466a0
1 changed files with 5 additions and 9 deletions
|
|
@ -6288,19 +6288,15 @@ static void UpdatePingTable(void)
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i] && playernode[i] > 0)
|
if (playeringame[i] && playernode[i] > 0)
|
||||||
{
|
|
||||||
if (! server_lagless && playernode[i] > 0 && !players[i].spectator)
|
|
||||||
{
|
|
||||||
lag = GetLag(playernode[i]);
|
|
||||||
realpingtable[i] += lag;
|
|
||||||
|
|
||||||
if (! fastest || lag < fastest)
|
|
||||||
fastest = lag;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// TicsToMilliseconds can't handle pings over 1000ms lol
|
// TicsToMilliseconds can't handle pings over 1000ms lol
|
||||||
realpingtable[i] += GetLag(playernode[i]);
|
realpingtable[i] += GetLag(playernode[i]);
|
||||||
|
|
||||||
|
if (!players[i].spectator)
|
||||||
|
{
|
||||||
|
lag = playerpingtable[i];
|
||||||
|
if (! fastest || lag < fastest)
|
||||||
|
fastest = lag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue