mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 00:26:33 +02:00
Immediately hide fading overlays if other hand starts teleporting
This commit is contained in:
parent
6ae206677d
commit
3284b2a90e
1 changed files with 16 additions and 0 deletions
|
@ -580,6 +580,21 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
}
|
||||
};
|
||||
|
||||
this.cancelFade = function () {
|
||||
// Other hand may call this to immediately hide fading overlays.
|
||||
var i, length;
|
||||
if (this.teleportedFadeTimer) {
|
||||
Overlays.editOverlay(this.teleportedTargetOverlay, { visible: false });
|
||||
if (this.wasPlayAreaVisible) {
|
||||
Overlays.editOverlay(this.playAreaOverlay, { visible: false });
|
||||
for (i = 0, length = this.playAreaSensorPositionOverlays.length; i < length; i++) {
|
||||
Overlays.editOverlay(this.playAreaSensorPositionOverlays[i], { visible: false });
|
||||
}
|
||||
}
|
||||
this.teleportedFadeTimer = null;
|
||||
}
|
||||
};
|
||||
|
||||
this.setTeleportVisible = function (visible, mode, fade) {
|
||||
// Scales in teleport target and play area when start displaying them.
|
||||
if (visible === this.isTeleportVisible) {
|
||||
|
@ -596,6 +611,7 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
end: { dimensions: Vec3.ZERO }
|
||||
}
|
||||
);
|
||||
this.getOtherModule().cancelFade();
|
||||
this.teleportScaleStart = Date.now();
|
||||
this.teleportScaleFactor = 0;
|
||||
this.scaleInTeleport();
|
||||
|
|
Loading…
Reference in a new issue