ignore keepmusic when called from P_RestoreMusic

most of the sound handling just calls this and this may just stop the music entirely on some occasions so just ignore keepmusic for that
This commit is contained in:
Alug committed 2024-10-13 00:40:51 +02:00
1 parent fe51278295
commit b58fcf331c
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -5361,7 +5361,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
// Plays the music during and after the starting countdown.
if (P_IsLocalPlayer(player))
S_StartMapMusic();
S_StartMapMusic(false);
}
void K_KartPlayerAfterThink(player_t *player)
+1 -1
View File
@@ -743,7 +743,7 @@ void P_RestoreMusic(player_t *player)
return;
if (leveltime < MUSICSTARTTIME)
S_StartMapMusic();
S_StartMapMusic(true);
else // see also where time overs are handled - search for "lives = 2" in this file
{
INT32 wantedmus = 0; // 0 is level music, 1 is invincibility, 2 is grow
+3 -3
View File
@@ -2276,18 +2276,18 @@ void S_InitMapMusic(void)
//S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0);
}
void S_StartMapMusic(void)
void S_StartMapMusic(boolean restore)
{
//no need to constantly run this after race has started
if (leveltime > MUSICSTARTTIME)
return;
if (keepmusic)
if (keepmusic && !restore) // make sure this doesent kill the music when its called from P_RestoreMusic in some cases
return;
if (skipintromus)
{
if (leveltime < starttime) // dumb but i dont need this to be spammed honestly
if (leveltime < starttime)
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
if (leveltime == MUSICSTARTTIME)
S_ShowMusicCredit();
+1 -1
View File
@@ -110,7 +110,7 @@ void S_StopSounds(void);
void S_ClearSfx(void);
void S_InitMapMusic(void);
void S_StartMapMusic(void);
void S_StartMapMusic(boolean restore);
void S_CheckMap(void);