fix not being able to skip when epilepsy warning is taking its time

This commit is contained in:
yugecin 2016-11-20 22:41:33 +01:00
parent 8421930f27
commit 6ef16bce36

View File

@ -1682,13 +1682,13 @@ public class Game extends BasicGameState {
private synchronized boolean skipIntro() { private synchronized boolean skipIntro() {
int firstObjectTime = beatmap.objects[0].getTime(); int firstObjectTime = beatmap.objects[0].getTime();
int trackPosition = MusicController.getPosition(); int trackPosition = MusicController.getPosition();
if (objectIndex == 0 && trackPosition < firstObjectTime - SKIP_OFFSET) { if (objectIndex == 0 && (trackPosition < firstObjectTime - SKIP_OFFSET) || isLeadIn()) {
if (isLeadIn()) { if (isLeadIn()) {
leadInTime = 0; leadInTime = 0;
epiImgTime = 0; epiImgTime = 0;
MusicController.resume(); MusicController.resume();
} }
MusicController.setPosition(firstObjectTime - SKIP_OFFSET); MusicController.setPosition(Math.max(0, firstObjectTime - SKIP_OFFSET));
MusicController.setPitch(GameMod.getSpeedMultiplier() * playbackSpeed.getModifier()); MusicController.setPitch(GameMod.getSpeedMultiplier() * playbackSpeed.getModifier());
replaySkipTime = (isReplay) ? -1 : trackPosition; replaySkipTime = (isReplay) ? -1 : trackPosition;
if (isReplay) { if (isReplay) {