diff --git a/Assets/Scripts/Controls/CursorHandler.cs b/Assets/Scripts/Controls/CursorHandler.cs
index 043cc7f..88949b4 100644
--- a/Assets/Scripts/Controls/CursorHandler.cs
+++ b/Assets/Scripts/Controls/CursorHandler.cs
@@ -24,13 +24,21 @@ namespace Cyber.Controls {
private bool CursorLocked = true;
private bool RequestedLockState = true;
- private bool Requested = false;
+ ///
+ /// Request a new lock state. The cursor will be locked in case there
+ /// isn't another reason to have it in a different state (like the
+ /// being up).
+ ///
+ /// If set to true, cursor might bse
+ /// locked.
public void RequestLockState(bool locked) {
RequestedLockState = locked;
- Requested = true;
}
+ ///
+ /// Is the cursor currently locked?
+ ///
public bool Locked() {
return Term.IsVisible() || RequestedLockState;
}
@@ -43,10 +51,9 @@ namespace Cyber.Controls {
if (Term.IsVisible()) {
CursorLocked = false;
UpdateCursor();
- } else if (Requested) {
+ } else {
CursorLocked = RequestedLockState;
UpdateCursor();
- Requested = false;
}
}