mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
cleanup
This commit is contained in:
parent
108e7a2fc1
commit
7fae7e9c77
2 changed files with 32 additions and 34 deletions
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
{ "from": [ "Hydra.L1", "Hydra.L3" ], "to": "Standard.LeftPrimaryThumb" },
|
{ "from": [ "Hydra.L1", "Hydra.L3" ], "to": "Standard.LeftPrimaryThumb" },
|
||||||
{ "from": [ "Hydra.R1", "Hydra.R3" ], "to": "Standard.RightPrimaryThumb" },
|
{ "from": [ "Hydra.R1", "Hydra.R3" ], "to": "Standard.RightPrimaryThumb" },
|
||||||
|
{ "from": [ "Hydra.R2", "Hydra.R4" ], "to": "Standard.RightSecondaryThumb" },
|
||||||
|
{ "from": [ "Hydra.L2", "Hydra.L4" ], "to": "Standard.LeftSecondaryThumb" },
|
||||||
{ "from": "Hydra.LeftHand", "to": "Standard.LeftHand" },
|
{ "from": "Hydra.LeftHand", "to": "Standard.LeftHand" },
|
||||||
{ "from": "Hydra.RightHand", "to": "Standard.RightHand" }
|
{ "from": "Hydra.RightHand", "to": "Standard.RightHand" }
|
||||||
]
|
]
|
||||||
|
|
|
@ -246,7 +246,7 @@ function Teleporter() {
|
||||||
if (teleporter.teleportHand === 'left') {
|
if (teleporter.teleportHand === 'left') {
|
||||||
teleporter.leftRay();
|
teleporter.leftRay();
|
||||||
//|| leftTrigger.buttonValue === 0
|
//|| leftTrigger.buttonValue === 0
|
||||||
if ((leftPad.buttonValue === 0 ) && inTeleportMode === true) {
|
if ((leftPad.buttonValue === 0) && inTeleportMode === true) {
|
||||||
_this.teleport();
|
_this.teleport();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ function Teleporter() {
|
||||||
} else {
|
} else {
|
||||||
teleporter.rightRay();
|
teleporter.rightRay();
|
||||||
//|| rightTrigger.buttonValue === 0
|
//|| rightTrigger.buttonValue === 0
|
||||||
if ((rightPad.buttonValue === 0 ) && inTeleportMode === true) {
|
if ((rightPad.buttonValue === 0) && inTeleportMode === true) {
|
||||||
_this.teleport();
|
_this.teleport();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -586,37 +586,37 @@ function registerMappings() {
|
||||||
teleportMapping.from(Controller.Standard.LeftPrimaryThumb).peek().to(leftPad.buttonPress);
|
teleportMapping.from(Controller.Standard.LeftPrimaryThumb).peek().to(leftPad.buttonPress);
|
||||||
|
|
||||||
teleportMapping.from(Controller.Standard.LeftPrimaryThumb)
|
teleportMapping.from(Controller.Standard.LeftPrimaryThumb)
|
||||||
// .when(leftTrigger.down)
|
// .when(leftTrigger.down)
|
||||||
.to(function(value) {
|
.to(function(value) {
|
||||||
if (isDisabled === true) {
|
if (isDisabled === true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (activationTimeout !== null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
activationTimeout = Script.setTimeout(function() {
|
||||||
|
teleporter.enterTeleportMode('left')
|
||||||
|
Script.clearTimeout(activationTimeout);
|
||||||
|
activationTimeout = null;
|
||||||
|
}, TELEPORT_DELAY)
|
||||||
return;
|
return;
|
||||||
}
|
});
|
||||||
if (activationTimeout !== null) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
activationTimeout = Script.setTimeout(function() {
|
|
||||||
teleporter.enterTeleportMode('left')
|
|
||||||
Script.clearTimeout(activationTimeout);
|
|
||||||
activationTimeout = null;
|
|
||||||
}, TELEPORT_DELAY)
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
teleportMapping.from(Controller.Standard.RightPrimaryThumb)
|
teleportMapping.from(Controller.Standard.RightPrimaryThumb)
|
||||||
// .when(rightTrigger.down)
|
// .when(rightTrigger.down)
|
||||||
.to(function(value) {
|
.to(function(value) {
|
||||||
if (isDisabled === true) {
|
if (isDisabled === true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (activationTimeout !== null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
activationTimeout = Script.setTimeout(function() {
|
||||||
|
teleporter.enterTeleportMode('right')
|
||||||
|
Script.clearTimeout(activationTimeout);
|
||||||
|
activationTimeout = null;
|
||||||
|
}, TELEPORT_DELAY)
|
||||||
return;
|
return;
|
||||||
}
|
});
|
||||||
if (activationTimeout !== null) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
activationTimeout = Script.setTimeout(function() {
|
|
||||||
teleporter.enterTeleportMode('right')
|
|
||||||
Script.clearTimeout(activationTimeout);
|
|
||||||
activationTimeout = null;
|
|
||||||
}, TELEPORT_DELAY)
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
// teleportMapping.from(Controller.Standard.RT).when(Controller.Standard.RightPrimaryThumb).to(function(value) {
|
// teleportMapping.from(Controller.Standard.RT).when(Controller.Standard.RightPrimaryThumb).to(function(value) {
|
||||||
// if (isDisabled === true) {
|
// if (isDisabled === true) {
|
||||||
// return;
|
// return;
|
||||||
|
@ -667,10 +667,8 @@ function cleanup() {
|
||||||
var isDisabled = false;
|
var isDisabled = false;
|
||||||
var handleHandMessages = function(channel, message, sender) {
|
var handleHandMessages = function(channel, message, sender) {
|
||||||
var data;
|
var data;
|
||||||
print('its a message')
|
|
||||||
if (sender === MyAvatar.sessionUUID) {
|
if (sender === MyAvatar.sessionUUID) {
|
||||||
if (channel === 'Hifi-Teleport-Disabler') {
|
if (channel === 'Hifi-Teleport-Disabler') {
|
||||||
print('got teleport disabler message' + message)
|
|
||||||
if (message === 'disable') {
|
if (message === 'disable') {
|
||||||
isDisabled = true;
|
isDisabled = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue