From 5cd2613f78300d3f57ab4b5004d2d5cbb50a2edd Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Fri, 22 Feb 2019 18:59:21 +0800 Subject: [PATCH] Fix moveImage --- libs/events.js | 2 +- libs/maps.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/events.js b/libs/events.js index 3cad299e..27627d6e 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1810,7 +1810,7 @@ events.prototype.moveImage = function (code, to, opacityVal, time, callback) { var animate = setInterval(function () { step++; moveStep(); - if (step > steps) { + if (step == steps) { if (core.isset(opacityVal)) core.setOpacity(name, opacityVal); delete core.animateFrame.asyncId[animate]; diff --git a/libs/maps.js b/libs/maps.js index 3ad953a4..c0ba3b1f 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -208,13 +208,14 @@ maps.prototype.decompressMap = function (mapArr, floorId) { var mw = core.floors[floorId].width || 13; var mh = core.floors[floorId].height || 13; for (var x=0;x