From cc5dc61e3eaaa038c1ade42e35c19d60cc5897cd Mon Sep 17 00:00:00 2001 From: Big Bad Waffle Date: Wed, 9 Oct 2019 19:42:36 +0200 Subject: [PATCH] another fix for #1030 --- src/server/config/maps/dungeon.json | 2 +- src/server/objects/objBase.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/server/config/maps/dungeon.json b/src/server/config/maps/dungeon.json index b519aa9d..9e07c096 100644 --- a/src/server/config/maps/dungeon.json +++ b/src/server/config/maps/dungeon.json @@ -641,4 +641,4 @@ "type":"map", "version":1, "width":200 -} \ No newline at end of file +} diff --git a/src/server/objects/objBase.js b/src/server/objects/objBase.js index b36f5fc0..db1e7f75 100644 --- a/src/server/objects/objBase.js +++ b/src/server/objects/objBase.js @@ -190,8 +190,12 @@ module.exports = { this.actionQueue.spliceWhere(a => a.priority); this.actionQueue.splice(0, 0, action); } else { - if (action.priority) + if (action.priority) { this.spellbook.stopCasting(); + this.actionQueue.splice(0, 0, action); + return; + } + this.actionQueue.push(action); } }, @@ -289,7 +293,7 @@ module.exports = { (deltaX === 0) && (deltaY === 0) ) - ) + ) return false; } @@ -300,7 +304,7 @@ module.exports = { this.x = data.x; this.y = data.y; - } else + } else return false; } else { physics.removeObject(this, this.x, this.y, data.x, data.y);