mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Music: Do not do fades if not playing
This fixes a regression where entering playtesting while a track was fading out (by exiting out of playtesting with a track playing and then immediately entering back in with the level start music set) would result in no music. The cause is the game doing fades even though nothing is playing, which puts it in a confusing state.
This commit is contained in:
@@ -328,6 +328,11 @@ static enum FadeCode processmusicfade(struct FadeState* state, int* volume)
|
|||||||
|
|
||||||
void musicclass::fadeMusicVolumeIn(int ms)
|
void musicclass::fadeMusicVolumeIn(int ms)
|
||||||
{
|
{
|
||||||
|
if (halted())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_doFadeInVol = true;
|
m_doFadeInVol = true;
|
||||||
m_doFadeOutVol = false;
|
m_doFadeOutVol = false;
|
||||||
|
|
||||||
@@ -345,6 +350,11 @@ void musicclass::fadeMusicVolumeIn(int ms)
|
|||||||
|
|
||||||
void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
|
void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
|
||||||
{
|
{
|
||||||
|
if (halted())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_doFadeInVol = false;
|
m_doFadeInVol = false;
|
||||||
m_doFadeOutVol = true;
|
m_doFadeOutVol = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user