From b52c73f2b0fa32fbc349804621cf947dff2d364e Mon Sep 17 00:00:00 2001 From: CrusherNotDrip Date: Mon, 26 May 2025 14:26:51 -0400 Subject: [PATCH] Fix crash when mashing I or D on title state. --- source/funkin/ui/title/TitleState.hx | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/source/funkin/ui/title/TitleState.hx b/source/funkin/ui/title/TitleState.hx index 82838e4a1..2663de831 100644 --- a/source/funkin/ui/title/TitleState.hx +++ b/source/funkin/ui/title/TitleState.hx @@ -234,12 +234,29 @@ class TitleState extends MusicBeatState Conductor.instance.update(); - if (FlxG.keys.justPressed.I) + /* if (FlxG.onMobile) + { + if (gfDance != null) + { + gfDance.x = (FlxG.width / 2) + (FlxG.accelerometer.x * (FlxG.width / 2)); + // gfDance.y = (FlxG.height / 2) + (FlxG.accelerometer.y * (FlxG.height / 2)); + } + } + */ + if (outlineShaderShit != null) { - FlxTween.tween(outlineShaderShit, {funnyX: 50, funnyY: 50}, 0.6, {ease: FlxEase.quartOut}); + if (FlxG.keys.justPressed.I) + { + FlxTween.tween(outlineShaderShit, {funnyX: 50, funnyY: 50}, 0.6, {ease: FlxEase.quartOut}); + } + + if (FlxG.keys.pressed.D) + { + outlineShaderShit.funnyX += 1; + } + + // outlineShaderShit.xPos.value[0] += 1; } - if (FlxG.keys.pressed.D) outlineShaderShit.funnyX += 1; - // outlineShaderShit.xPos.value[0] += 1; if (FlxG.keys.justPressed.Y) {