diff --git a/Assets/Scripts/Interface/Terminal.cs b/Assets/Scripts/Interface/Terminal.cs index 1e5d5ea..ee80210 100644 --- a/Assets/Scripts/Interface/Terminal.cs +++ b/Assets/Scripts/Interface/Terminal.cs @@ -22,6 +22,7 @@ namespace NeonTea.Quakeball.Interface { private InputAction ToggleTerminalAction; private InputAction SubmitTerminal; private float DesiredTerminalPos; + private bool OpenUpdated; private bool IsOpen = false; private Dictionary> Commands = new Dictionary>(); @@ -90,7 +91,11 @@ namespace NeonTea.Quakeball.Interface { } InputField.readOnly = true; if (Player != null) { - Player.DisableInput = IsOpen; + if (IsOpen) { + Player.DisableInput += 1; + } else { + Player.DisableInput -= 1; + } } } diff --git a/Assets/Scripts/Players/LocalPlayer.cs b/Assets/Scripts/Players/LocalPlayer.cs index 0546947..31783d2 100644 --- a/Assets/Scripts/Players/LocalPlayer.cs +++ b/Assets/Scripts/Players/LocalPlayer.cs @@ -8,7 +8,7 @@ namespace NeonTea.Quakeball.Players { /// A controller class for a local player. Handles input and updates the relevant components. [RequireComponent(typeof(Player))] public class LocalPlayer : MonoBehaviour { - public bool DisableInput = false; + public int DisableInput; public float FullSyncFrequency = 1; public Player Player { private set; get; } @@ -63,7 +63,7 @@ namespace NeonTea.Quakeball.Players { } private void Update() { - if (DisableInput) { + if (DisableInput > 0) { CrouchAction.Disable(); JumpAction.Disable(); LookAction.Disable();