mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Merge pull request #8810 from ZappoMan/handControlsWhileLoading
make laser pointers work even while content is loading
This commit is contained in:
commit
fc8bbde60a
2 changed files with 14 additions and 3 deletions
|
@ -2770,7 +2770,13 @@ var handleHandMessages = function(channel, message, sender) {
|
||||||
|
|
||||||
Messages.messageReceived.connect(handleHandMessages);
|
Messages.messageReceived.connect(handleHandMessages);
|
||||||
|
|
||||||
|
var BASIC_TIMER_INTERVAL = 20; // 20ms = 50hz good enough
|
||||||
|
var updateIntervalTimer = Script.setInterval(function(){
|
||||||
|
update();
|
||||||
|
}, BASIC_TIMER_INTERVAL);
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
Script.clearInterval(updateIntervalTimer);
|
||||||
rightController.cleanup();
|
rightController.cleanup();
|
||||||
leftController.cleanup();
|
leftController.cleanup();
|
||||||
Controller.disableMapping(MAPPING_NAME);
|
Controller.disableMapping(MAPPING_NAME);
|
||||||
|
@ -2778,6 +2784,5 @@ function cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Script.scriptEnding.connect(cleanup);
|
Script.scriptEnding.connect(cleanup);
|
||||||
Script.update.connect(update);
|
|
||||||
|
|
||||||
}()); // END LOCAL_SCOPE
|
}()); // END LOCAL_SCOPE
|
||||||
|
|
|
@ -507,10 +507,15 @@ function update() {
|
||||||
clearSystemLaser();
|
clearSystemLaser();
|
||||||
Reticle.visible = false;
|
Reticle.visible = false;
|
||||||
}
|
}
|
||||||
setupHandler(Script.update, update);
|
|
||||||
|
var BASIC_TIMER_INTERVAL = 20; // 20ms = 50hz good enough
|
||||||
|
var updateIntervalTimer = Script.setInterval(function(){
|
||||||
|
update();
|
||||||
|
}, BASIC_TIMER_INTERVAL);
|
||||||
|
|
||||||
|
|
||||||
// Check periodically for changes to setup.
|
// Check periodically for changes to setup.
|
||||||
var SETTINGS_CHANGE_RECHECK_INTERVAL = 10 * 1000; // milliseconds
|
var SETTINGS_CHANGE_RECHECK_INTERVAL = 10 * 1000; // 10 seconds
|
||||||
function checkSettings() {
|
function checkSettings() {
|
||||||
updateFieldOfView();
|
updateFieldOfView();
|
||||||
updateRecommendedArea();
|
updateRecommendedArea();
|
||||||
|
@ -520,6 +525,7 @@ checkSettings();
|
||||||
var settingsChecker = Script.setInterval(checkSettings, SETTINGS_CHANGE_RECHECK_INTERVAL);
|
var settingsChecker = Script.setInterval(checkSettings, SETTINGS_CHANGE_RECHECK_INTERVAL);
|
||||||
Script.scriptEnding.connect(function () {
|
Script.scriptEnding.connect(function () {
|
||||||
Script.clearInterval(settingsChecker);
|
Script.clearInterval(settingsChecker);
|
||||||
|
Script.clearInterval(updateIntervalTimer);
|
||||||
OffscreenFlags.navigationFocusDisabled = false;
|
OffscreenFlags.navigationFocusDisabled = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue