G_StopDemo: use D_ClearState

- D_ClearState does the necessary cleanup and more
- Fix splitscreen viewcount not being reset when demo ends
This commit is contained in:
James R 2024-02-01 02:26:38 -08:00
parent ebbe8203a2
commit 4c3bad0b12

View file

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