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:
parent
375c72cfbd
commit
2fed0928d8
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue