mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Fix music resetting after reloading the gamestate
This commit is contained in:
parent
546a3ff015
commit
fd3189a5f6
1 changed files with 4 additions and 2 deletions
|
|
@ -4038,18 +4038,20 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
||||||
|
|
||||||
// Fade out music here. Deduct 2 tics so the fade volume actually reaches 0.
|
// Fade out music here. Deduct 2 tics so the fade volume actually reaches 0.
|
||||||
// But don't halt the music! S_Start will take care of that. This dodges a MIDI crash bug.
|
// But don't halt the music! S_Start will take care of that. This dodges a MIDI crash bug.
|
||||||
if (!titlemapinaction && (RESETMUSIC ||
|
if (!(reloadinggamestate || titlemapinaction) && (RESETMUSIC ||
|
||||||
strnicmp(S_MusicName(),
|
strnicmp(S_MusicName(),
|
||||||
(mapmusflags & MUSIC_RELOADRESET) ? mapheaderinfo[gamemap-1]->musname : mapmusname, 7)))
|
(mapmusflags & MUSIC_RELOADRESET) ? mapheaderinfo[gamemap-1]->musname : mapmusname, 7)))
|
||||||
|
{
|
||||||
S_FadeMusic(0, FixedMul(
|
S_FadeMusic(0, FixedMul(
|
||||||
FixedDiv((F_GetWipeLength(wipedefs[wipe_level_toblack])-2)*NEWTICRATERATIO, NEWTICRATE), MUSICRATE));
|
FixedDiv((F_GetWipeLength(wipedefs[wipe_level_toblack])-2)*NEWTICRATERATIO, NEWTICRATE), MUSICRATE));
|
||||||
|
}
|
||||||
|
|
||||||
// Let's fade to black here
|
// Let's fade to black here
|
||||||
// But only if we didn't do the special stage wipe
|
// But only if we didn't do the special stage wipe
|
||||||
if (rendermode != render_none && !(ranspecialwipe || reloadinggamestate))
|
if (rendermode != render_none && !(ranspecialwipe || reloadinggamestate))
|
||||||
P_RunLevelWipe();
|
P_RunLevelWipe();
|
||||||
|
|
||||||
if (!titlemapinaction)
|
if (!(reloadinggamestate || titlemapinaction))
|
||||||
{
|
{
|
||||||
if (ranspecialwipe == 2)
|
if (ranspecialwipe == 2)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue