From 24b8eaa58e9474bccd1846779cad53cd24cf8bce Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sun, 20 Oct 2019 19:30:11 +0200 Subject: [PATCH] sanity --- game/modules/tome/class/interface/ActorAI.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/modules/tome/class/interface/ActorAI.lua b/game/modules/tome/class/interface/ActorAI.lua index ade1b2ec66..bacf1faed6 100644 --- a/game/modules/tome/class/interface/ActorAI.lua +++ b/game/modules/tome/class/interface/ActorAI.lua @@ -811,7 +811,7 @@ end -- returns true/false (grid found?), grid x, grid y function _M:aiCanFleeDmapKeepLos() if self:attr("never_move") then return false end -- Dont move, dont flee - if self.ai_target.actor then + if self.ai_target.actor and self.ai_target.actor.distanceMap then local act = self.ai_target.actor local ax, ay = self:aiSeeTargetPos(act) local dir, c -- GitLab