diff --git a/game/engines/default/engine/interface/ActorAI.lua b/game/engines/default/engine/interface/ActorAI.lua index 7d8fec7d336801fc6f3b8074f94fabc264dbbc4e..76746304307fb2de1a75c1b61ae329844e710f70 100644 --- a/game/engines/default/engine/interface/ActorAI.lua +++ b/game/engines/default/engine/interface/ActorAI.lua @@ -75,7 +75,7 @@ end --- Move one step to the given target if possible -- This tries the most direct route, if not available it checks sides and always tries to get closer function _M:moveDirection(x, y, force) - if not self.x or not self.y then return false end + if not self.x or not self.y or not x or not y then return false end local l = line.new(self.x, self.y, x, y) local lx, ly = l() if lx and ly then