From bd1c664fb395ef44bae72f7baaf553b6e8e747f3 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 8 Jul 2020 12:00:40 +0800 Subject: [PATCH] Fix replay stackoverflow --- libs/control.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/control.js b/libs/control.js index a1fc35bd..119a5f00 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1568,9 +1568,7 @@ control.prototype.__replay_getTimeout = function () { control.prototype._replayAction_move = function (action) { if (["up","down","left","right"].indexOf(action)<0) return false; - core.moveHero(action, function () { - setTimeout(core.replay); - }); + core.moveHero(action, core.replay); return true; }