mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix regression with niceplay() moving back and forth between zones
2.3 has a regression where if you move back and forth between a zone,
you can get the wrong music playing in a zone. An example is the
Overworld and Lab. Just walk in to the Lab and immediately walk back
out, and you'll get Potential for Anything playing in the Overworld.
This regression was caused by facb079b35
.
That commit removed assigning -1 to currentsong when a fadeout was
called.
Basically, the previous behavior was: currentsong is 4, we enter Lab and
nicechange gets queued to 3 but currentsong gets set to -1, then going
back nicechange gets queued to 4 again.
However, if we don't assign -1, then going back will keep nicechange at
3. Why? Because niceplay() checks for currentsong before assigning
nicechange. If currentsong is still the same then it doesn't assign
nicechange.
To fix this, just always unconditionally assign nicechange.
This commit is contained in:
parent
1c3274645d
commit
ad88939dbb
1 changed files with 1 additions and 1 deletions
|
@ -414,8 +414,8 @@ void musicclass::niceplay(int t)
|
|||
fadeout(false);
|
||||
}
|
||||
nicefade = true;
|
||||
nicechange = t;
|
||||
}
|
||||
nicechange = t;
|
||||
}
|
||||
|
||||
void musicclass::changemusicarea(int x, int y)
|
||||
|
|
Loading…
Reference in a new issue