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:
SteelT 2021-01-10 15:12:44 -05:00
parent 329eae3ee3
commit 151acf4f68
2 changed files with 5 additions and 6 deletions

View file

@ -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);
}

View file

@ -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
//