From 9b3e2837b7788677463b006f83d7cabc158ffb2a Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Fri, 25 Feb 2022 22:32:05 -0500 Subject: [PATCH] Fixed falling block spawn trigger --- src/npc/ai/misc.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/npc/ai/misc.rs b/src/npc/ai/misc.rs index 59abd71..346525c 100644 --- a/src/npc/ai/misc.rs +++ b/src/npc/ai/misc.rs @@ -2115,9 +2115,11 @@ impl NPC { ) -> GameResult { match self.action_num { 0 => { - if self.x < (stage.map.width as i32 - 6) * state.tile_size.as_int() * 0x200 { - self.action_num = 1; - self.action_counter = 0; + for player in players { + if player.x < (stage.map.width as i32 - 6) * state.tile_size.as_int() * 0x200 { + self.action_num = 1; + self.action_counter = 0; + } } } 1 => {