mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Ensure all fade-ins start from zero
This fixes a bug where fading music in but not going through the music.play() path wouldn't start the fade volume from zero. If this happened, then the previous volume would persist, and if the previous volume was the max volume, then that essentially canceled out the fade-in and prevented it from happening at all. But now all paths to fadeMusicVolumeIn() set the volume to zero first, instead of only the caller of music.play().
This commit is contained in:
@@ -238,7 +238,6 @@ void musicclass::play(int t)
|
||||
else
|
||||
{
|
||||
fadeMusicVolumeIn(3000);
|
||||
musicVolume = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,6 +289,10 @@ void musicclass::fadeMusicVolumeIn(int ms)
|
||||
{
|
||||
m_doFadeInVol = true;
|
||||
m_doFadeOutVol = false;
|
||||
|
||||
/* Ensure it starts at 0 */
|
||||
musicVolume = 0;
|
||||
|
||||
setfadeamount(ms);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user