mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-02 21:22:40 +00:00
Drop frames as the host according to the lowest ping among clients
This commit is contained in:
parent
2c67c97c58
commit
5f26312a0a
1 changed files with 22 additions and 0 deletions
|
|
@ -4960,6 +4960,28 @@ static void CL_SendClientCmd(void)
|
|||
size_t packetsize = 0;
|
||||
boolean mis = false;
|
||||
|
||||
int fastest;
|
||||
int lag;
|
||||
int i;
|
||||
|
||||
fastest = 0;
|
||||
|
||||
if (server)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (playernode[i] > 0 && playeringame[i])
|
||||
{
|
||||
lag = GetLag(playernode[i]);
|
||||
if (! fastest || lag < fastest)
|
||||
fastest = lag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fastest && ( gametic % fastest ))
|
||||
return;
|
||||
|
||||
netbuffer->packettype = PT_CLIENTCMD;
|
||||
|
||||
if (cl_packetmissed)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue