mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-04 01:11:14 +00:00
Title demos don't interrupt the music
This commit is contained in:
parent
5a06ae76ea
commit
1ab5ac58a7
5 changed files with 12 additions and 7 deletions
|
@ -897,7 +897,9 @@ void F_StartTitleScreen(void)
|
|||
// IWAD dependent stuff.
|
||||
|
||||
// music is started in the ticker
|
||||
S_StopMusic();
|
||||
if (!fromtitledemo) // SRB2Kart: Don't reset music if the right track is already playing
|
||||
S_StopMusic();
|
||||
fromtitledemo = false;
|
||||
|
||||
animtimer = 0;
|
||||
|
||||
|
@ -1065,7 +1067,7 @@ void F_TitleScreenTicker(boolean run)
|
|||
return;
|
||||
}*/
|
||||
|
||||
titledemo = true;
|
||||
titledemo = fromtitledemo = true;
|
||||
G_DoPlayDemo(dname);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,7 @@ static char demoname[64];
|
|||
boolean demorecording;
|
||||
boolean demoplayback;
|
||||
boolean titledemo; // Title Screen demo can be cancelled by any key
|
||||
boolean fromtitledemo; // SRB2Kart: Don't stop the music
|
||||
static UINT8 *demobuffer = NULL;
|
||||
static UINT8 *demo_p, *demotime_p;
|
||||
static UINT8 *demoend;
|
||||
|
|
|
@ -36,7 +36,7 @@ extern boolean playeringame[MAXPLAYERS];
|
|||
// ======================================
|
||||
|
||||
// demoplaying back and demo recording
|
||||
extern boolean demoplayback, titledemo, demorecording, timingdemo;
|
||||
extern boolean demoplayback, titledemo, fromtitledemo, demorecording, timingdemo;
|
||||
|
||||
// Quit after playing a demo from cmdline.
|
||||
extern boolean singledemo;
|
||||
|
|
|
@ -1683,7 +1683,8 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
|
|||
S_ClearSfx();
|
||||
#endif
|
||||
|
||||
if (S_MusicDisabled())
|
||||
if (S_MusicDisabled()
|
||||
|| titledemo) // SRB2Kart: Demos don't interrupt title screen music
|
||||
return;
|
||||
|
||||
// No Music (empty string)
|
||||
|
@ -1717,7 +1718,8 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
|
|||
|
||||
void S_StopMusic(void)
|
||||
{
|
||||
if (!I_SongPlaying())
|
||||
if (!I_SongPlaying()
|
||||
|| titledemo) // SRB2Kart: Demos don't interrupt title screen music
|
||||
return;
|
||||
|
||||
if (I_SongPaused())
|
||||
|
|
|
@ -412,10 +412,10 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"s3k3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Thunder Shield spawned
|
||||
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Thunder Shield use
|
||||
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart AIZ dust
|
||||
{"s3k48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
|
Loading…
Reference in a new issue