some clean up

This commit is contained in:
Dante Ruiz 2018-07-06 09:00:00 -07:00
parent 533164e1e4
commit 6d8fe870e4

View file

@ -764,9 +764,6 @@ void CharacterController::updateState() {
btScalar horizontalSpeed = (velocity - velocity.dot(_currentUp) * _currentUp).length();
bool flyingFast = horizontalSpeed > (MAX_WALKING_SPEED * 0.75f);
if (!_flyingAllowed && rayHasHit) {
SET_STATE(State::InAir, "flying not allowed");
}
if ((_floorDistance < MIN_HOVER_HEIGHT) && !jumpButtonHeld && !flyingFast) {
SET_STATE(State::InAir, "near ground");
} else if (((_floorDistance < FLY_TO_GROUND_THRESHOLD) || _hasSupport) && !flyingFast) {