Skip to content

Commit

Permalink
revert autorun changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Mineev committed Jun 2, 2024
1 parent 4336a87 commit 5bfdfed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Assets/Scripts/Game/Player/PlayerSpeedChanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ public class PlayerSpeedChanger : MonoBehaviour
private float previousBaseWalkSpeed;
private float previousBaseRunSpeed;
private float baseSpeed = 0;
private bool _hideScreenControls;

private void Start()
{
_hideScreenControls = ScreenControls.Instance.HideControls;
playerMotor = GameManager.Instance.PlayerMotor;
levitateMotor = GetComponent<LevitateMotor>();
CanRun = CanRunUnlessRiding;
Expand All @@ -82,7 +80,7 @@ public void CaptureInputSpeedAdjustment()
sneakingMode = sneakingMode ^ InputManager.Instance.ActionStarted(InputManager.Actions.Sneak);

if (InputManager.Instance.ActionStarted(InputManager.Actions.AutoRun)
&& !InputManager.Instance.HasAction(InputManager.Actions.MoveBackwards) && _hideScreenControls)
&& !InputManager.Instance.HasAction(InputManager.Actions.MoveBackwards))
{
InputManager.Instance.ToggleAutorun = !InputManager.Instance.ToggleAutorun;

Expand Down

0 comments on commit 5bfdfed

Please sign in to comment.