From 35750caea73adb9f6f2bf4a5153481e77d35bcc6 Mon Sep 17 00:00:00 2001 From: Xilexio Date: Sun, 19 May 2019 08:08:40 +0200 Subject: [PATCH] Added support for returning false by costCallback option of Room.findPath. --- src/game/rooms.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/rooms.js b/src/game/rooms.js index cff0dd22..afed3da2 100644 --- a/src/game/rooms.js +++ b/src/game/rooms.js @@ -248,6 +248,9 @@ function _findPath2(id, fromPos, toPos, opts) { if(resultMatrix instanceof globals.PathFinder.CostMatrix) { costMatrix = resultMatrix; } + else if(resultMatrix === false) { + return false; + } } return costMatrix; },