diff --git a/Assets/_Game/Scripts/Player/States/FallState.cs b/Assets/_Game/Scripts/Player/States/FallState.cs index 1ea8419..b97455f 100644 --- a/Assets/_Game/Scripts/Player/States/FallState.cs +++ b/Assets/_Game/Scripts/Player/States/FallState.cs @@ -97,7 +97,8 @@ namespace BaseGames.Player.States int wallDir = wd.WallDirection; bool pressingTowardWall = Mathf.Abs(Input.MoveInput.x) > 0.01f && (int)Mathf.Sign(Input.MoveInput.x) == wallDir; - if (pressingTowardWall || Owner.IsPostWallJump) + if ((pressingTowardWall || Owner.IsPostWallJump) + && Stats != null && Stats.HasAbility(AbilityType.WallCling)) { _owner.TransitionTo(_owner.GetState()); return; diff --git a/Assets/_Game/Scripts/Player/States/JumpState.cs b/Assets/_Game/Scripts/Player/States/JumpState.cs index cb1675c..5f36c98 100644 --- a/Assets/_Game/Scripts/Player/States/JumpState.cs +++ b/Assets/_Game/Scripts/Player/States/JumpState.cs @@ -93,7 +93,8 @@ namespace BaseGames.Player.States int wallDir = wd.WallDirection; bool pressingTowardWall = Mathf.Abs(Input.MoveInput.x) > 0.01f && (int)Mathf.Sign(Input.MoveInput.x) == wallDir; - if (pressingTowardWall || Owner.IsPostWallJump) + if ((pressingTowardWall || Owner.IsPostWallJump) + && Stats != null && Stats.HasAbility(AbilityType.WallCling)) { _owner.TransitionTo(_owner.GetState()); return;