Fix omitted return in MyAvatar::scaleMotorSpeed

This commit is contained in:
r3tk0n 2019-04-03 13:06:22 -07:00
parent 874fb6b6d7
commit 8b670110a9

View file

@ -3397,7 +3397,12 @@ glm::vec3 MyAvatar::scaleMotorSpeed(const glm::vec3 forward, const glm::vec3 rig
} else {
// Desktop mode.
direction = (zSpeed * forward) + (xSpeed * right);
auto length = glm::length(direction);
if (length > EPSILON) {
direction /= length;
}
direction *= getWalkSpeed() * _walkSpeedScalar;
return direction;
}
}