From 04f6eaf5dc5dea11c54264b0b03618ac85f696c1 Mon Sep 17 00:00:00 2001 From: adrien Date: Sat, 23 Dec 2023 03:02:47 +0100 Subject: [PATCH] fix action timout on key up --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 1722d82..aad4601 100644 --- a/js/app.js +++ b/js/app.js @@ -206,7 +206,7 @@ function onkeyup(event) { scheduler.clearTimeout(repeat) scheduler.clearInterval(autorepeat) if (actionsQueue.length) { - if (action == playerActions.softDrop) scheduler.setInterval(autorepeat, settings.fallPeriod/20) + if (actionsQueue[0] == playerActions.softDrop) scheduler.setInterval(autorepeat, settings.fallPeriod/20) else scheduler.setTimeout(repeat, settings.das) } else { matrix.drawPiece()