From 10d601ddc90dac1731d62eec67d6d9727f3cb997 Mon Sep 17 00:00:00 2001 From: Kade M Date: Fri, 25 Jun 2021 17:28:29 -0700 Subject: [PATCH] revert to default input on a non cpp target --- source/PlayState.hx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 1ff301c..89568bb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1441,7 +1441,9 @@ class PlayState extends MusicBeatState return; if (keys[data]) + { return; + } keys[data] = true; @@ -3200,6 +3202,8 @@ class PlayState extends MusicBeatState }; #end + var nonCpp = false; + // Prevent player input if botplay is on if(PlayStateChangeables.botPlay) @@ -3209,6 +3213,10 @@ class PlayState extends MusicBeatState releaseArray = [false, false, false, false]; } + #if !cpp + nonCpp = true; + #end + var anas:Array = [null,null,null,null]; for (i in 0...pressArray.length) @@ -3225,7 +3233,7 @@ class PlayState extends MusicBeatState }); } - if (KeyBinds.gamepad && !FlxG.keys.justPressed.ANY) + if ((KeyBinds.gamepad && !FlxG.keys.justPressed.ANY) || nonCpp) { // PRESSES, check for note hits if (pressArray.contains(true) && generatedMusic)