From ceb6751831655bb7e927ab953b23667d86963f47 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 12 Nov 2016 19:04:40 +0100 Subject: [PATCH] leadin delay 2s --- src/itdelatrisu/opsu/states/Game.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index b9b1589f..03b4eb4b 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -308,6 +308,9 @@ public class Game extends BasicGameState { int width = container.getWidth(); int height = container.getHeight(); int trackPosition = MusicController.getPosition(); + if (isLeadIn()) { + trackPosition -= leadInTime; + } if (pauseTime > -1) // returning from pause screen trackPosition = pauseTime; else if (deathTime > -1) // "Easy" mod: health bar increasing @@ -1357,6 +1360,12 @@ public class Game extends BasicGameState { MusicController.setPitch(GameMod.getSpeedMultiplier()); MusicController.pause(); + if (gameObjects.length > 0) { + int leadIntime = 2000 - gameObjects[0].getTime(); + if (leadIntime > 0) { + this.leadInTime = Math.max(leadIntime, this.leadInTime); + } + } SoundController.mute(false); }