diff --git a/src/f_finale.c b/src/f_finale.c index 9cd2f6e14..2d391a4d8 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -39,6 +39,7 @@ static INT32 finalecount; INT32 titlescrollspeed = 80; boolean titlemapinaction = false; +boolean titlemaptransition = false; static INT32 timetonext; // Delay between screen changes static INT32 continuetime; // Short delay when continuing @@ -281,6 +282,8 @@ void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean reset void F_StartIntro(void) { + S_StopMusic(); + if (introtoplay) { if (!cutscenes[introtoplay - 1]) @@ -1428,7 +1431,7 @@ void F_StartTitleScreen(void) mapthing_t *startpos; gamestate_t prevwipegamestate = wipegamestate; - titlemapinaction = true; + titlemapinaction = titlemaptransition = true; gamemap = titlemap; if (!mapheaderinfo[gamemap-1]) @@ -1437,9 +1440,8 @@ void F_StartTitleScreen(void) maptol = mapheaderinfo[gamemap-1]->typeoflevel; globalweather = mapheaderinfo[gamemap-1]->weather; - G_DoLoadLevel(true); + G_DoLoadLevel(true); // handles music change players[displayplayer].playerstate = PST_DEAD; // Don't spawn the player in dummy (I'm still a filthy cheater) - //camera.subsector = NULL; // toast is filthy too // Set Default Position if (playerstarts[0]) @@ -1477,6 +1479,7 @@ void F_StartTitleScreen(void) { titlemapinaction = false; gamemap = 1; // g_game.c + S_ChangeMusicInternal("_title", looptitle); CON_ClearHUD(); } @@ -1484,7 +1487,6 @@ void F_StartTitleScreen(void) // IWAD dependent stuff. - S_ChangeMusicInternal("_title", looptitle); animtimer = 0; demoDelayLeft = demoDelayTime; diff --git a/src/f_finale.h b/src/f_finale.h index f710a74fb..7d41b5720 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -62,6 +62,7 @@ void F_ContinueDrawer(void); extern INT32 titlescrollspeed; extern boolean titlemapinaction; +extern boolean titlemaptransition; // // WIPE diff --git a/src/g_game.c b/src/g_game.c index 08d849a80..a3b2d9528 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1635,6 +1635,12 @@ void G_DoLoadLevel(boolean resetplayer) if (gamestate == GS_INTERMISSION) Y_EndIntermission(); + // cleanup + if (titlemaptransition) + titlemaptransition = false; + else + titlemapinaction = false; + G_SetGamestate(GS_LEVEL); for (i = 0; i < MAXPLAYERS; i++) diff --git a/src/p_setup.c b/src/p_setup.c index 4f11c10d0..85f5d346c 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2643,7 +2643,11 @@ boolean P_SetupLevel(boolean skipprecip) // As oddly named as this is, this handles music only. // We should be fine starting it here. - S_Start(); + /// ... as long as this isn't a titlemap transition, that is + if (!titlemapinaction) + S_Start(); + else + S_ChangeMusicInternal("_title", looptitle); // Let's fade to black here // But only if we didn't do the special stage wipe @@ -2657,7 +2661,7 @@ boolean P_SetupLevel(boolean skipprecip) } // Print "SPEEDING OFF TO [ZONE] [ACT 1]..." - if (rendermode != render_none) + if (!titlemapinaction && rendermode != render_none) { // Don't include these in the fade! char tx[64];