diff --git a/src/d_main.c b/src/d_main.c index 61dd538a8..866795522 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -251,7 +251,16 @@ void D_ProcessEvents (void) // wipegamestate can be set to -1 to force a wipe on the next draw gamestate_t wipegamestate = GS_DEMOSCREEN; -static int screen_melt = wipe_Melt; +static int screen_melt = wipe_Melt, old_screen_melt = -1; + +void D_RestoreScreenMelt() +{ + if (old_screen_melt >= 0) + { + screen_melt = old_screen_melt; + old_screen_melt = -1; + } +} void D_Display (void) { @@ -531,6 +540,20 @@ void D_DoAdvanceDemo(void) demosequence); break; } + + if (old_screen_melt < 0) + { + old_screen_melt = screen_melt; + } + + if (demoloop_point->outro_wipe == WIPE_IMMEDIATE) + { + screen_melt = wipe_None; + } + else if (demoloop_point->outro_wipe == WIPE_MELT) + { + screen_melt = wipe_Melt; + } } // diff --git a/src/d_main.h b/src/d_main.h index 865c65d83..6e72f0068 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -62,6 +62,8 @@ void D_StartTitle(void); extern boolean advancedemo; +void D_RestoreScreenMelt(void); + #endif //---------------------------------------------------------------------------- diff --git a/src/g_game.c b/src/g_game.c index 431f546ad..127a1010b 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2835,6 +2835,9 @@ void G_Ticker(void) G_DoReborn (i); P_MapEnd(); + if (gameaction != ga_nothing && gameaction != ga_playdemo) + D_RestoreScreenMelt(); + // do things to change the game state while (gameaction != ga_nothing) switch (gameaction)