fix soft drop interval

This commit is contained in:
Adrien MALINGREY 2019-10-27 12:33:09 +01:00
parent e4dce4c2f4
commit eba036cffd

View File

@ -607,8 +607,9 @@ function keyDownHandler(e) {
actionsToRepeat.unshift(action) actionsToRepeat.unshift(action)
scheduler.clearTimeout(autorepeat) scheduler.clearTimeout(autorepeat)
scheduler.clearInterval(autorepeat) scheduler.clearInterval(autorepeat)
if (actionsToRepeat == softDrop) if (action == softDrop) {
scheduler.setInterval(autorepeat, FALL_DELAY / 20) scheduler.setInterval(autorepeat, stats.fallDelay / 20)
}
else else
scheduler.setTimeout(autorepeat, AUTOREPEAT_DELAY) scheduler.setTimeout(autorepeat, AUTOREPEAT_DELAY)
} }