If the client has caught up to the server -- say, during a wipe -- make GetLag return a ping of zero

Should fix the momentarily large ping bug.
This commit is contained in:
toaster 2022-08-25 18:00:19 +01:00
parent 4473b6852f
commit d86081cb8a
1 changed files with 3 additions and 0 deletions

View File

@ -6221,6 +6221,9 @@ INT32 D_NumPlayers(void)
tic_t GetLag(INT32 node)
{
// If the client has caught up to the server -- say, during a wipe -- lag is meaningless.
if (nettics[node] > gametic)
return 0;
return gametic - nettics[node];
}