Skip to content

Commit

Permalink
1.4 Modify cursor lock behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Courtney May committed Feb 15, 2018
1 parent 2f788be commit 7063e82
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions server_mod/CursorManager.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
using System;
using UnityEngine;
using UnityEngine.Rendering;

// Token: 0x0200006E RID: 110
public partial class CursorManager : MonoBehaviour
{
// Token: 0x06000219 RID: 537 RVA: 0x00012850 File Offset: 0x00010A50
public void LateUpdate()
{
bool flag = CursorManager.eqOpen | CursorManager.pauseOpen | CursorManager.isServerOnly | CursorManager.consoleOpen | CursorManager.is079 | CursorManager.scp106 | CursorManager.roundStarted | CursorManager.raOp;
Cursor.lockState = CursorLockMode.None;
Cursor.visible = flag;
bool visible = CursorManager.eqOpen | CursorManager.pauseOpen | CursorManager.isServerOnly | CursorManager.consoleOpen | CursorManager.is079 | CursorManager.scp106 | CursorManager.roundStarted | CursorManager.raOp;
Cursor.lockState = ((!visible) ? CursorLockMode.Locked : CursorLockMode.None);
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Null)
{
Cursor.lockState = CursorLockMode.None;
}
Cursor.visible = visible;
}
}

0 comments on commit 7063e82

Please sign in to comment.