From 8ed70d5d8476adf1c784ed6d255b4f7734ae3644 Mon Sep 17 00:00:00 2001 From: rampa3 <68955305+rampa3@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:57:47 +0200 Subject: [PATCH] Added missing mouse look enabled check --- scripts/system/controllers/mouseLook.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/scripts/system/controllers/mouseLook.js b/scripts/system/controllers/mouseLook.js index cefe6e0c04..6535a2e07e 100644 --- a/scripts/system/controllers/mouseLook.js +++ b/scripts/system/controllers/mouseLook.js @@ -154,17 +154,19 @@ by rampa3 (https://github.com/rampa3) and vegaslon (https://github.com/vegaslon) function onUiFocusChanged(keyFocus) { if (!hmd) { - if (keyFocus) { - keysOnOverlay = true; - if (Camera.captureMouse) { - Camera.captureMouse = false; - } - } else { - keysOnOverlay = false; - if (!tablet.tabletShown) { - if (!tempOff) { - if (!away) { - mouseLookOn(); + if (mouseLookEnabled) { + if (keyFocus) { + keysOnOverlay = true; + if (Camera.captureMouse) { + mouseLookOff(); + } + } else { + keysOnOverlay = false; + if (!tablet.tabletShown) { + if (!tempOff) { + if (!away) { + mouseLookOn(); + } } } }