* Fix titlemap music change bug reported by Larztard

* Clean up titlemapinaction so that it isn't true when you're playing
* Don't print "SPEEDING OFF TO [ZONE] [ACT 1]..." on screen if it's a titlemap - keep a nice and pretty black screen
This commit is contained in:
toasterbabe 2017-05-09 00:48:07 +01:00
parent dd57e47574
commit 3a4e091ba6
4 changed files with 19 additions and 6 deletions

View File

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

View File

@ -62,6 +62,7 @@ void F_ContinueDrawer(void);
extern INT32 titlescrollspeed;
extern boolean titlemapinaction;
extern boolean titlemaptransition;
//
// WIPE

View File

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

View File

@ -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];