diff --git a/src/d_clisrv.c b/src/d_clisrv.c index e8700cd0..f8938d6c 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -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++) diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 21fe7c38..6615d67d 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -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;