From 81755d4ad9388afcdd99c12cb04e708663e078be Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Sat, 6 Aug 2022 12:44:14 -0400 Subject: [PATCH] Require control to look up/down while falling --- src/player/mod.rs | 10 ++++++++-- src/scene/game_scene.rs | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/player/mod.rs b/src/player/mod.rs index 95d4827..73dce22 100644 --- a/src/player/mod.rs +++ b/src/player/mod.rs @@ -800,11 +800,17 @@ impl Player { self.anim_num = 0; self.anim_counter = 0; } - } else if (self.controller.look_up() || self.strafe_up) && self.control_mode == ControlMode::Normal { + } else if state.control_flags.control_enabled() + && (self.controller.look_up() || self.strafe_up) + && self.control_mode == ControlMode::Normal + { self.skin.set_state(PlayerAnimationState::FallingLookingUp); self.anim_num = 0; self.anim_counter = 0; - } else if self.controller.look_down() && self.control_mode == ControlMode::Normal { + } else if state.control_flags.control_enabled() + && self.controller.look_down() + && self.control_mode == ControlMode::Normal + { self.skin.set_state(PlayerAnimationState::FallingLookingDown); self.anim_num = 0; self.anim_counter = 0; diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index e61daae..65665ea 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -1772,6 +1772,7 @@ impl Scene for GameScene { TextScriptExecutionState::Running(_, _) | TextScriptExecutionState::WaitTicks(_, _, _) | TextScriptExecutionState::WaitInput(_, _, _) + | TextScriptExecutionState::WaitStanding(_, _) | TextScriptExecutionState::Msg(_, _, _, _) | TextScriptExecutionState::MsgNewLine(_, _, _, _, _) | TextScriptExecutionState::FallingIsland(_, _, _, _, _, _)