Added missing mouse look enabled check

This commit is contained in:
rampa3 2023-08-29 15:57:47 +02:00
parent 831ef9a3bb
commit 8ed70d5d84

View file

@ -154,10 +154,11 @@ by rampa3 (https://github.com/rampa3) and vegaslon (https://github.com/vegaslon)
function onUiFocusChanged(keyFocus) {
if (!hmd) {
if (mouseLookEnabled) {
if (keyFocus) {
keysOnOverlay = true;
if (Camera.captureMouse) {
Camera.captureMouse = false;
mouseLookOff();
}
} else {
keysOnOverlay = false;
@ -171,6 +172,7 @@ by rampa3 (https://github.com/rampa3) and vegaslon (https://github.com/vegaslon)
}
}
}
}
Script.scriptEnding.connect(onScriptEnding);