mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Allow input buffer to hold more than 64 tics
This commit is contained in:
parent
dc527a8afb
commit
d6aed61ded
2 changed files with 7 additions and 6 deletions
|
|
@ -4260,8 +4260,8 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||||
txtpak = (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots
|
txtpak = (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots
|
||||||
* netbuffer->u.serverpak.numtics];
|
* netbuffer->u.serverpak.numtics];
|
||||||
|
|
||||||
if (realend > gametic + BACKUPTICS)
|
if (realend > gametic + CLIENTBACKUPTICS)
|
||||||
realend = gametic + BACKUPTICS;
|
realend = gametic + CLIENTBACKUPTICS;
|
||||||
cl_packetmissed = realstart > neededtic;
|
cl_packetmissed = realstart > neededtic;
|
||||||
|
|
||||||
if (realstart <= neededtic && realend > neededtic)
|
if (realstart <= neededtic && realend > neededtic)
|
||||||
|
|
@ -4604,11 +4604,11 @@ static void SV_SendTics(void)
|
||||||
for (n = 1; n < MAXNETNODES; n++)
|
for (n = 1; n < MAXNETNODES; n++)
|
||||||
if (nodeingame[n])
|
if (nodeingame[n])
|
||||||
{
|
{
|
||||||
lasttictosend = maketic;
|
|
||||||
|
|
||||||
// assert supposedtics[n]>=nettics[n]
|
// assert supposedtics[n]>=nettics[n]
|
||||||
realfirsttic = supposedtics[n];
|
realfirsttic = supposedtics[n];
|
||||||
if (realfirsttic >= maketic)
|
lasttictosend = min(maketic, realfirsttic + CLIENTBACKUPTICS);
|
||||||
|
|
||||||
|
if (realfirsttic >= lasttictosend)
|
||||||
{
|
{
|
||||||
// well we have sent all tics we will so use extrabandwidth
|
// well we have sent all tics we will so use extrabandwidth
|
||||||
// to resent packet that are supposed lost (this is necessary since lost
|
// to resent packet that are supposed lost (this is necessary since lost
|
||||||
|
|
@ -4617,7 +4617,7 @@ static void SV_SendTics(void)
|
||||||
DEBFILE(va("Nothing to send node %u mak=%u sup=%u net=%u \n",
|
DEBFILE(va("Nothing to send node %u mak=%u sup=%u net=%u \n",
|
||||||
n, maketic, supposedtics[n], nettics[n]));
|
n, maketic, supposedtics[n], nettics[n]));
|
||||||
realfirsttic = nettics[n];
|
realfirsttic = nettics[n];
|
||||||
if (realfirsttic >= maketic || (I_GetTime() + n)&3)
|
if (realfirsttic >= lasttictosend || (I_GetTime() + n)&3)
|
||||||
// all tic are ok
|
// all tic are ok
|
||||||
continue;
|
continue;
|
||||||
DEBFILE(va("Sent %d anyway\n", realfirsttic));
|
DEBFILE(va("Sent %d anyway\n", realfirsttic));
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ applications may follow different packet versions.
|
||||||
|
|
||||||
// Networking and tick handling related.
|
// Networking and tick handling related.
|
||||||
#define BACKUPTICS 96
|
#define BACKUPTICS 96
|
||||||
|
#define CLIENTBACKUPTICS 32
|
||||||
#define MAXTEXTCMD 256
|
#define MAXTEXTCMD 256
|
||||||
//
|
//
|
||||||
// Packet structure
|
// Packet structure
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue