From 3be5bd49e39ddc6d1df2a90c7b0c392652ece65b Mon Sep 17 00:00:00 2001 From: lizhuoyuan <2820814112@qq.com> Date: Thu, 6 Feb 2025 08:48:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:debug=E6=A8=A1=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/control.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/control.js b/libs/control.js index 66e4aa31..3414bb06 100644 --- a/libs/control.js +++ b/libs/control.js @@ -729,7 +729,14 @@ control.prototype._moveHero_moving = function () { core.status.automaticRoute.moveDirectly = false; var move = function () { if (!core.status.heroStop) { - if ((core.hasFlag('debug') && core.status.ctrlDown) || core.hasFlag('debug_wallHacking')) { + if (core.hasFlag('debug') && core.status.ctrlDown) { + if (core.status.heroMoving != 0) return; + // 检测是否穿出去 + var nx = core.nextX(), ny = core.nextY(); + if (nx < 0 || nx >= core.bigmap.width || ny < 0 || ny >= core.bigmap.height) return; + core.eventMoveHero([core.getHeroLoc('direction')], core.values.moveSpeed, move); + } + else if (core.hasFlag('debug_wallHacking')) { if (core.status.heroMoving != 0) return; // 检测是否穿出去 var nx = core.nextX(), ny = core.nextY();