1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-03-23 10:29:18 +00:00

Fixed butes getting stuck in walls

This commit is contained in:
dawnDus 2022-01-15 16:36:24 -05:00
parent 375c72cfbd
commit 2fed0928d8
No known key found for this signature in database
GPG key ID: 972AABDE81848F21

View file

@ -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
}