Merge pull request #13471 from danteruiz/disable-flying-by-default

Disable flying by default
This commit is contained in:
John Conklin II 2018-06-27 16:04:16 -07:00 committed by GitHub
commit 0cb8b4dfa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -714,7 +714,8 @@ void MyAvatar::simulate(float deltaTime) {
entityTree->recurseTreeWithOperator(&moveOperator);
}
});
_characterController.setFlyingAllowed(zoneAllowsFlying && _enableFlying);
bool isPhysicsEnabled = qApp->isPhysicsEnabled();
_characterController.setFlyingAllowed(zoneAllowsFlying && (_enableFlying || !isPhysicsEnabled));
_characterController.setCollisionlessAllowed(collisionlessAllowed);
}
@ -1099,6 +1100,7 @@ void MyAvatar::saveData() {
settings.setValue("useSnapTurn", _useSnapTurn);
settings.setValue("clearOverlayWhenMoving", _clearOverlayWhenMoving);
settings.setValue("userHeight", getUserHeight());
settings.setValue("enabledFlying", getFlyingEnabled());
settings.endGroup();
}
@ -1248,7 +1250,7 @@ void MyAvatar::loadData() {
settings.remove("avatarEntityData");
}
setAvatarEntityDataChanged(true);
setFlyingEnabled(settings.value("enabledFlying").toBool());
setDisplayName(settings.value("displayName").toString());
setCollisionSoundURL(settings.value("collisionSoundURL", DEFAULT_AVATAR_COLLISION_SOUND_URL).toString());
setSnapTurn(settings.value("useSnapTurn", _useSnapTurn).toBool());

View file

@ -1434,7 +1434,7 @@ private:
std::array<float, MAX_DRIVE_KEYS> _driveKeys;
std::bitset<MAX_DRIVE_KEYS> _disabledDriveKeys;
bool _enableFlying { true };
bool _enableFlying { false };
bool _wasPushing { false };
bool _isPushing { false };
bool _isBeingPushed { false };