mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01: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:
parent
c88f249f48
commit
5fbdf2b663
2 changed files with 12 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ public:
|
|||
void resumefade(const int fadein_ms);
|
||||
void pause(void);
|
||||
void haltdasmusik(void);
|
||||
void haltdasmusik(bool from_fade);
|
||||
void silencedasmusik(void);
|
||||
void fadeMusicVolumeIn(int ms);
|
||||
void fadeMusicVolumeOut(const int fadeout_ms);
|
||||
|
|
Loading…
Reference in a new issue