mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Replace BACKUPTICS with TICQUEUE
Seems to help with the very frequent timeouts. Still weird issues with node/netcmd being resent or something...
This commit is contained in:
parent
329eae3ee3
commit
151acf4f68
2 changed files with 5 additions and 6 deletions
|
|
@ -5250,8 +5250,8 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
txtpak = (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots
|
||||
* netbuffer->u.serverpak.numtics];
|
||||
|
||||
if (realend > gametic + BACKUPTICS)
|
||||
realend = gametic + BACKUPTICS;
|
||||
if (realend > gametic + TICQUEUE)
|
||||
realend = gametic + TICQUEUE;
|
||||
cl_packetmissed = realstart > neededtic;
|
||||
|
||||
if (realstart <= neededtic && realend > neededtic)
|
||||
|
|
@ -5702,8 +5702,8 @@ static void SV_SendTics(void)
|
|||
realfirsttic = supposedtics[n];
|
||||
lasttictosend = maketic;
|
||||
|
||||
if (lasttictosend - nettics[n] >= BACKUPTICS)
|
||||
lasttictosend = nettics[n] + BACKUPTICS-1;
|
||||
if (lasttictosend - nettics[n] >= TICQUEUE)
|
||||
lasttictosend = nettics[n] + TICQUEUE-1;
|
||||
|
||||
if (realfirsttic >= lasttictosend)
|
||||
{
|
||||
|
|
@ -6263,7 +6263,7 @@ void NetUpdate(void)
|
|||
{
|
||||
firstticstosend = nettics[i];
|
||||
|
||||
if (maketic + 1 >= nettics[i] + BACKUPTICS)
|
||||
if (maketic + 1 >= nettics[i] + TICQUEUE)
|
||||
Net_ConnectionTimeout(i);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ applications may follow different packet versions.
|
|||
// be transmitted.
|
||||
|
||||
// Networking and tick handling related.
|
||||
#define BACKUPTICS 1024
|
||||
#define TICQUEUE 512 // more than enough for most timeouts....
|
||||
#define MAXTEXTCMD 256
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue