diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 07cb54ecd..c22400717 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3167,10 +3167,14 @@ static void Command_connect(void) M_ClearMenus(true); - if (Playing() || demo.title) + if (Playing() || demo.title || demo.playback) { - if (demo.title) + if (demo.title || demo.playback) + { G_CheckDemoStatus(); + if (multiplayer && !demo.title) // dumb hack: G_CheckDemoStatus doesent call G_StopDemo for multiplayer demos + G_StopDemo(); + } if (netgame) { diff --git a/src/g_game.c b/src/g_game.c index 54e509be6..5fdbbd231 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -8017,7 +8017,7 @@ void G_StopDemo(void) demobuf.buffer = NULL; demo.playback = false; if (demo.title) - modeattacking = false; + modeattacking = ATTACKING_NONE; demo.title = false; demo.timing = false; singletics = false; @@ -8044,6 +8044,8 @@ void G_StopDemo(void) if (gamestate == GS_VOTING) Y_EndVote(); + M_ClearMenus(true); + G_SetGamestate(GS_NULL); wipegamestate = GS_NULL; SV_StopServer(); @@ -8086,12 +8088,16 @@ boolean G_CheckDemoStatus(void) I_Quit(); if (multiplayer && !demo.title) + { G_ExitLevel(); + } else { + UINT8 wasmodeattacking = modeattacking; + G_StopDemo(); - if (modeattacking) + if (wasmodeattacking) M_EndModeAttackRun(); else D_StartTitle(); @@ -8130,6 +8136,8 @@ static void G_ResetDemoPlayback(char *pdemoname) Z_Free(demobuf.buffer); demobuf.buffer = NULL; demo.playback = false; + if (demo.title) + modeattacking = ATTACKING_NONE; demo.title = false; }