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
This commit is contained in:
Alug 2025-11-01 03:00:19 +01:00 committed by NepDisk
parent afed09485a
commit 9c1fe512fc

View file

@ -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);