From 6ef16bce36bc9ebca76e0c31855b070b63f334c2 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 20 Nov 2016 22:41:33 +0100 Subject: [PATCH] fix not being able to skip when epilepsy warning is taking its time --- src/itdelatrisu/opsu/states/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index d9de92da..d47ba2ec 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1682,13 +1682,13 @@ public class Game extends BasicGameState { private synchronized boolean skipIntro() { int firstObjectTime = beatmap.objects[0].getTime(); int trackPosition = MusicController.getPosition(); - if (objectIndex == 0 && trackPosition < firstObjectTime - SKIP_OFFSET) { + if (objectIndex == 0 && (trackPosition < firstObjectTime - SKIP_OFFSET) || isLeadIn()) { if (isLeadIn()) { leadInTime = 0; epiImgTime = 0; MusicController.resume(); } - MusicController.setPosition(firstObjectTime - SKIP_OFFSET); + MusicController.setPosition(Math.max(0, firstObjectTime - SKIP_OFFSET)); MusicController.setPitch(GameMod.getSpeedMultiplier() * playbackSpeed.getModifier()); replaySkipTime = (isReplay) ? -1 : trackPosition; if (isReplay) {