From 346dee019ca4e7571be7baf83104e2bd43c2b17b Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 28 May 2025 18:30:26 +0200 Subject: [PATCH] fix compiler warning bout playeringame --- src/d_clisrv.c | 14 +++++++------- src/d_netcmd.c | 7 ++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 9625934fc..98b4b1e55 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1693,7 +1693,7 @@ static void SV_SendPlayerInfo(INT32 node) continue; } - if (playeringame[i] == UINT8_MAX || !playeringame[i]) + if (playernode[i] == UINT8_MAX || !playeringame[i]) { netbuffer->u.playerinfo[i].node = 255; // This slot is empty. continue; @@ -5324,18 +5324,18 @@ static void HandlePacketFromPlayer(SINT8 node) /// \todo Use a separate cvar for that kind of timeout? freezetimeout[node] = I_GetTime() + connectiontimeout; - // If we've alredy received a ticcmd for this tic, just submit it for the next one. - tic_t faketic = maketic; - if ((!!(netcmds[maketic % TICQUEUE][netconsole].angleturn & TICCMD_RECEIVED)) - && (maketic - firstticstosend < TICQUEUE - 1)) - faketic++; - // Don't do anything for packets of type NODEKEEPALIVE? // Sryder 2018/07/01: Update the freezetimeout still! if (netbuffer->packettype == PT_NODEKEEPALIVE || netbuffer->packettype == PT_NODEKEEPALIVEMIS) break; + // If we've alredy received a ticcmd for this tic, just submit it for the next one. + tic_t faketic = maketic; + if ((!!(netcmds[maketic % TICQUEUE][netconsole].angleturn & TICCMD_RECEIVED)) + && (maketic - firstticstosend < TICQUEUE - 1)) + faketic++; + // Copy ticcmd G_MoveTiccmd(&netcmds[faketic%TICQUEUE][netconsole], &netbuffer->u.clientpak.cmd, 1); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 5b8a8c18b..862ebb679 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -216,11 +216,8 @@ static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2 static CV_PossibleValue_t startingliveslimit_cons_t[] = {{1, "MIN"}, {99, "MAX"}, {0, NULL}}; static CV_PossibleValue_t sleeping_cons_t[] = {{0, "MIN"}, {1000/TICRATE, "MAX"}, {0, NULL}}; -static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Teleports"}, - {3, "None"}, {0, NULL}}; - -static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Non-Random"}, - {3, "None"}, {0, NULL}}; +static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Teleports"}, {3, "None"}, {0, NULL}}; +static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Non-Random"}, {3, "None"}, {0, NULL}}; //static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}}; static CV_PossibleValue_t match_scoring_cons_t[] = {{0, "Normal"}, {1, "Classic"}, {0, NULL}};