From 4c3bad0b12353271b1cef1fc9af3cbef580fa708 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 1 Feb 2024 02:26:38 -0800 Subject: [PATCH] G_StopDemo: use D_ClearState - D_ClearState does the necessary cleanup and more - Fix splitscreen viewcount not being reset when demo ends --- src/g_demo.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index b0f539f9c..fddf412cb 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -4252,16 +4252,7 @@ void G_StopDemo(void) Z_Free(demo.skinlist); demo.skinlist = NULL; - if (gamestate == GS_INTERMISSION) - Y_EndIntermission(); // cleanup - - if (gamestate == GS_VOTING) - Y_EndVote(); - - G_SetGamestate(GS_NULL); - wipegamestate = GS_NULL; - SV_StopServer(); - SV_ResetServer(); + D_ClearState(); } boolean G_CheckDemoStatus(void)