Extend pingtable by 1 for the servermaxping entry

This commit is contained in:
Sally Cochenour 2019-02-26 17:44:35 -05:00
parent 1d3adb0491
commit 22434949e5
2 changed files with 6 additions and 6 deletions

View File

@ -4400,12 +4400,12 @@ FILESTAMP
//Update client ping table from the server.
if (client)
{
INT32 i;
UINT8 i;
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i])
playerpingtable[i] = (tic_t)netbuffer->u.pingtable[i];
servermaxping = (tic_t)netbuffer->u.pingtable[i++];
servermaxping = (tic_t)netbuffer->u.pingtable[MAXPLAYERS];
}
break;
@ -5122,7 +5122,7 @@ static inline void PingUpdate(void)
}
// send the server's maxping as last element of our ping table. This is useful to let us know when we're about to get kicked.
netbuffer->u.pingtable[i++] = cv_maxping.value;
netbuffer->u.pingtable[MAXPLAYERS] = cv_maxping.value;
//send out our ping packets
for (i = 0; i < MAXNETNODES; i++)

View File

@ -452,10 +452,10 @@ typedef struct
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...)
askinfo_pak askinfo; // 61 bytes
msaskinfo_pak msaskinfo; // 22 bytes
plrinfo playerinfo[MAXPLAYERS]; // 1152 bytes (I'd say 36~38)
plrconfig playerconfig[MAXPLAYERS]; // (up to) 896 bytes (welp they ARE)
plrinfo playerinfo[MAXPLAYERS]; // 576 bytes(?)
plrconfig playerconfig[MAXPLAYERS]; // (up to) 528 bytes(?)
#ifdef NEWPING
UINT32 pingtable[MAXPLAYERS]; // 128 bytes
UINT32 pingtable[MAXPLAYERS+1]; // 68 bytes
#endif
} u; // This is needed to pack diff packet types data together
} ATTRPACK doomdata_t;