From 2fed0928d8f8666b270e3c7e8f8d48f71909d05f Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Sat, 15 Jan 2022 16:36:24 -0500 Subject: [PATCH] Fixed butes getting stuck in walls --- src/npc/ai/hell.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/npc/ai/hell.rs b/src/npc/ai/hell.rs index c49d938..a9b205c 100644 --- a/src/npc/ai/hell.rs +++ b/src/npc/ai/hell.rs @@ -555,10 +555,11 @@ impl NPC { self.action_num = 10 }; - if self.action_counter > 20 && (self.direction == Direction::Left && self.x <= player.x + 0x4000) - || (self.direction == Direction::Up && self.y <= player.y + 0x4000) - || (self.direction == Direction::Right && self.x <= player.x - 0x4000) - || (self.direction == Direction::Bottom && self.y <= player.y - 0x4000) + if self.action_counter > 20 + && ((self.direction == Direction::Left && self.x <= player.x + 0x4000) + || (self.direction == Direction::Up && self.y <= player.y + 0x4000) + || (self.direction == Direction::Right && self.x <= player.x - 0x4000) + || (self.direction == Direction::Bottom && self.y <= player.y - 0x4000)) { self.action_num = 10 }