mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Fix regression with music fade transitions not working
Unfortunately, 1de459d9b4 caused a
regression where musicclass::niceplay() didn't work, because fading out
the music would cause haltdasmusik() to be called, which would reset the
fade variables.
To fix this, haltdasmusik() will now only reset the fade variables if
it's not called from a fade, which is signaled with a function
parameter.
This commit is contained in:
@@ -1026,14 +1026,22 @@ void musicclass::pause(void)
|
||||
}
|
||||
|
||||
void musicclass::haltdasmusik(void)
|
||||
{
|
||||
haltdasmusik(false);
|
||||
}
|
||||
|
||||
void musicclass::haltdasmusik(const bool from_fade)
|
||||
{
|
||||
/* Just pauses music. This is intended. */
|
||||
pause();
|
||||
currentsong = -1;
|
||||
m_doFadeInVol = false;
|
||||
m_doFadeOutVol = false;
|
||||
nicefade = false;
|
||||
nicechange = -1;
|
||||
if (!from_fade)
|
||||
{
|
||||
nicefade = false;
|
||||
nicechange = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void musicclass::silencedasmusik(void)
|
||||
@@ -1145,7 +1153,7 @@ void musicclass::processmusicfadeout(void)
|
||||
{
|
||||
musicVolume = 0;
|
||||
m_doFadeOutVol = false;
|
||||
haltdasmusik();
|
||||
haltdasmusik(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user