mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 02:21:47 +00:00
Load mapmus vars post-boss even if another tune is playing, like a jingle
This commit is contained in:
parent
7d882c482f
commit
083de09f88
1 changed files with 6 additions and 3 deletions
|
@ -3530,8 +3530,7 @@ void A_BossDeath(mobj_t *mo)
|
||||||
junk.tag = 682;
|
junk.tag = 682;
|
||||||
EV_DoElevator(&junk, elevateHighest, false);
|
EV_DoElevator(&junk, elevateHighest, false);
|
||||||
|
|
||||||
// change the music if specified
|
if (mapheaderinfo[gamemap-1]->muspostbossname)
|
||||||
if (mapheaderinfo[gamemap-1]->muspostbossname && !strncmp(mapheaderinfo[gamemap-1]->musname, mapmusname, 7))
|
|
||||||
{
|
{
|
||||||
// Touching the egg trap button calls P_DoPlayerExit, which calls P_RestoreMusic.
|
// Touching the egg trap button calls P_DoPlayerExit, which calls P_RestoreMusic.
|
||||||
// So just park ourselves in the mapmus variables.
|
// So just park ourselves in the mapmus variables.
|
||||||
|
@ -3539,7 +3538,11 @@ void A_BossDeath(mobj_t *mo)
|
||||||
mapmusname[6] = 0;
|
mapmusname[6] = 0;
|
||||||
mapmusflags = (mapheaderinfo[gamemap-1]->muspostbosstrack & MUSIC_TRACKMASK) | MUSIC_RELOADRESET;
|
mapmusflags = (mapheaderinfo[gamemap-1]->muspostbosstrack & MUSIC_TRACKMASK) | MUSIC_RELOADRESET;
|
||||||
mapmusposition = mapheaderinfo[gamemap-1]->muspostbosspos;
|
mapmusposition = mapheaderinfo[gamemap-1]->muspostbosspos;
|
||||||
S_ChangeMusicAdvanced(mapmusname, mapmusflags, true, mapmusposition, (1*MUSICRATE)+(MUSICRATE/2), 0);
|
|
||||||
|
// don't change if we're in another tune
|
||||||
|
// but in case we're in jingle, use our parked mapmus variables so the correct track restores
|
||||||
|
if (!strncmp(mapheaderinfo[gamemap-1]->musname, mapmusname, 7))
|
||||||
|
S_ChangeMusicAdvanced(mapmusname, mapmusflags, true, mapmusposition, (1*MUSICRATE)+(MUSICRATE/2), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue