From 9c1fe512fc46159c5752d8131f33b4ecbdd62765 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 1 Nov 2025 03:00:19 +0100 Subject: [PATCH] SV_StopServer: reset textcmdbuf fixes an issue where in some rare cases, the game may get stuck in a weird limbo state due to the text command buffer being full and never be cleared, so net commands can never be executed --- src/d_clisrv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index bca05ae88..3770ecaeb 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -4133,8 +4133,17 @@ void SV_StopServer(void) P_UnloadLevel(); for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) + { localtextcmd[i][0] = 0; + while (textcmdbuf[i] != NULL) + { + textcmdbuf_t *buf = textcmdbuf[i]; + textcmdbuf[i] = textcmdbuf[i]->next; + Z_Free(buf); + } + } + for (i = firstticstosend; i < firstticstosend + BACKUPTICS; i++) D_Clearticcmd(i);