From cd049fd378f6cf56d95327d18dd67daa954914da Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Sat, 15 Jan 2022 16:13:21 -0500 Subject: [PATCH 1/4] don't allow inventory while scripts are running --- src/scene/game_scene.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index da298f6..05a5ad3 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -1351,7 +1351,9 @@ impl GameScene { self.hud_player2.tick(state, (&self.player2, &mut self.inventory_player2))?; self.boss_life_bar.tick(state, (&self.npc_list, &self.boss))?; - if self.player1.controller.trigger_inventory() { + if self.player1.controller.trigger_inventory() + && state.textscript_vm.state == TextScriptExecutionState::Ended + { state.textscript_vm.set_mode(ScriptMode::Inventory); self.player1.cond.set_interacted(false); } From 375c72cfbd05e86f52090c9ae86409d318906615 Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Sat, 15 Jan 2022 16:35:57 -0500 Subject: [PATCH 2/4] Fixed heavy press cutscene on switch --- src/npc/boss/heavy_press.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/npc/boss/heavy_press.rs b/src/npc/boss/heavy_press.rs index d0de8e2..8d4addc 100644 --- a/src/npc/boss/heavy_press.rs +++ b/src/npc/boss/heavy_press.rs @@ -88,7 +88,7 @@ impl BossNPC { if self.parts[0].action_num == 20 { self.parts[0].action_num = 21; self.parts[0].damage = 0; - self.parts[0].x = 0x14000; + self.parts[0].x = if !state.constants.is_switch { 0x14000 } else { 0x1A000 }; self.parts[0].y = 0x33A00; self.parts[0].npc_flags.set_solid_hard(false); self.parts[1].cond.set_alive(false); @@ -110,7 +110,7 @@ impl BossNPC { if self.parts[0].action_num == 30 { self.parts[0].action_num = 31; self.parts[0].anim_num = 2; - self.parts[0].x = 0x14000; + self.parts[0].x = if !state.constants.is_switch { 0x14000 } else { 0x1A000 }; self.parts[0].y = 0x8000; } self.parts[0].y += 0x800; 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 3/4] 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 } From 27003f4e64bc1ec26401d62bc78adf486124d6c4 Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Sat, 15 Jan 2022 17:28:29 -0500 Subject: [PATCH 4/4] fix ballos leaving animation --- src/npc/boss/ballos.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/npc/boss/ballos.rs b/src/npc/boss/ballos.rs index cf8b84d..bab9941 100644 --- a/src/npc/boss/ballos.rs +++ b/src/npc/boss/ballos.rs @@ -568,6 +568,7 @@ impl NPC { flash.set_blink(); state.sound_manager.play_sfx(29); } + self.anim_num = self.anim_num.max(8); self.animate(1, 8, 9); } _ => (),