Increasing vertical collision box when determining if pathfinding goal is inside box, fixes pathfinding with dragons

This commit is contained in:
Jordan Leppert 2022-03-20 12:03:26 +00:00
parent f096939f27
commit 14961e3c6b

View file

@ -184,7 +184,7 @@ local function movement_generic_pathfind(self, method, pos2, speed)
end
else
temp_goal = self._path[1]
if self:pos_in_box(get_goal_pos(self, temp_goal)) then
if self:pos_in_box(get_goal_pos(self, temp_goal), {math.max(self.width, 0.5), self.height}) then
table.remove(self._path, 1)
if #self._path > 0 then
temp_goal = self._path[1]