From 151acf4f689b67896b06b29c7a0ead68beb7ac09 Mon Sep 17 00:00:00 2001 From: SteelT Date: Sun, 10 Jan 2021 15:12:44 -0500 Subject: [PATCH] Replace BACKUPTICS with TICQUEUE Seems to help with the very frequent timeouts. Still weird issues with node/netcmd being resent or something... --- src/d_clisrv.c | 10 +++++----- src/d_clisrv.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 0121fbf62..1ebf4960a 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -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); } diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 66e58055e..8e7e9aee9 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -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 //