From 42b62ff2d531c8eda9960d185a19f2a201ac320e Mon Sep 17 00:00:00 2001 From: r3tk0n Date: Tue, 26 Feb 2019 19:16:34 -0800 Subject: [PATCH] Fix Ubuntu compiler warnings. --- interface/src/avatar/MyAvatar.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 64c251f1fa..b202c2f570 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -3371,12 +3371,11 @@ glm::vec3 MyAvatar::calculateScaledDirection(){ right = (handRotation * controllerRight); break; case MOVEMENT_HAND_RELATIVE_LEVELED: + handRotation = cancelOutRoll(handRotation); forward = (handRotation * controllerForward); - forward.y = 0.0f; - forward /= forward.length(); + //forward = glm::normalize(forward - (glm::dot(forward, Vectors::UNIT_Y) * Vectors::UNIT_Y)); right = (handRotation * controllerRight); - right.y = 0.0f; - right /= right.length(); + //right = glm::normalize(right - (glm::dot(right, Vectors::UNIT_Y) * Vectors::UNIT_Y)); break; case MOVEMENT_HMD_RELATIVE: default: @@ -3987,7 +3986,7 @@ void MyAvatar::setDriveGear1(float shiftPoint) { QMetaObject::invokeMethod(this, "setDriveGear1", Q_ARG(float, shiftPoint)); return; } - if (shiftPoint > 1.0 || shiftPoint < 0) return; + if (shiftPoint > 1.0f || shiftPoint < 0.0f) return; _driveGear1 = (shiftPoint <= _driveGear2) ? shiftPoint : _driveGear1; } @@ -4000,7 +3999,7 @@ void MyAvatar::setDriveGear2(float shiftPoint) { QMetaObject::invokeMethod(this, "setDriveGear2", Q_ARG(float, shiftPoint)); return; } - if (shiftPoint > 1.0 || shiftPoint < 0) return; + if (shiftPoint > 1.0f || shiftPoint < 0.0f) return; _driveGear2 = (shiftPoint <= _driveGear3 && shiftPoint >= _driveGear1) ? shiftPoint : _driveGear2; } @@ -4013,7 +4012,7 @@ void MyAvatar::setDriveGear3(float shiftPoint) { QMetaObject::invokeMethod(this, "setDriveGear3", Q_ARG(float, shiftPoint)); return; } - if (shiftPoint > 1.0 || shiftPoint < 0) return; + if (shiftPoint > 1.0f || shiftPoint < 0.0f) return; _driveGear3 = (shiftPoint <= _driveGear4 && shiftPoint >= _driveGear2) ? shiftPoint : _driveGear3; } @@ -4026,7 +4025,7 @@ void MyAvatar::setDriveGear4(float shiftPoint) { QMetaObject::invokeMethod(this, "setDriveGear4", Q_ARG(float, shiftPoint)); return; } - if (shiftPoint > 1.0 || shiftPoint < 0) return; + if (shiftPoint > 1.0f || shiftPoint < 0.0f) return; _driveGear4 = (shiftPoint <= _driveGear5 && shiftPoint >= _driveGear3) ? shiftPoint : _driveGear4; } @@ -4039,7 +4038,7 @@ void MyAvatar::setDriveGear5(float shiftPoint) { QMetaObject::invokeMethod(this, "setDriveGear5", Q_ARG(float, shiftPoint)); return; } - if (shiftPoint > 1.0 || shiftPoint < 0) return; + if (shiftPoint > 1.0f || shiftPoint < 0.0f) return; _driveGear5 = (shiftPoint >= _driveGear4) ? shiftPoint : _driveGear5; }