mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 03:59:18 +02:00
Combining three if statements into one!
This commit is contained in:
parent
bfcddcf3b7
commit
1c5923914b
1 changed files with 8 additions and 16 deletions
|
@ -15,9 +15,7 @@
|
|||
var isRocketing = false;
|
||||
|
||||
function checkRocketing() {
|
||||
if (HMD.active) {
|
||||
if (Controller.Hardware.Vive || Controller.Hardware.OculusTouch) {
|
||||
if (canRocket()) {
|
||||
if (HMD.active && (Controller.Hardware.Vive || Controller.Hardware.OculusTouch) && canRocket()) {
|
||||
isRocketing = true;
|
||||
MyAvatar.motorReferenceFrame = "world";
|
||||
var moveVector = Vec3.multiply(Quat.getFront(Camera.getOrientation()), 10);
|
||||
|
@ -29,12 +27,6 @@
|
|||
} else {
|
||||
checkCanStopRocketing();
|
||||
}
|
||||
} else {
|
||||
checkCanStopRocketing();
|
||||
}
|
||||
} else {
|
||||
checkCanStopRocketing();
|
||||
}
|
||||
};
|
||||
|
||||
function checkCanStopRocketing() {
|
||||
|
|
Loading…
Reference in a new issue