Bring this PR inline with RC70.1 PR.

This commit is contained in:
r3tk0n 2018-07-20 15:13:44 -07:00
parent 3108d650de
commit bc91affa70
2 changed files with 5 additions and 3 deletions

View file

@ -4841,9 +4841,10 @@ void Application::loadSettings() {
isFirstPerson = (qApp->isHMDMode());
// Flying should be disabled by default in HMD mode on first run, and it
// should be enabled by default in desktop mode, always.
// should be enabled by default in desktop mode.
auto myAvatar = getMyAvatar();
myAvatar->setFlyingEnabled((isFirstPerson)?false:true);
myAvatar->setFlyingEnabled(!isFirstPerson);
} else {
// if this is not the first run, the camera will be initialized differently depending on user settings

View file

@ -1281,7 +1281,8 @@ void MyAvatar::loadData() {
settings.remove("avatarEntityData");
}
setAvatarEntityDataChanged(true);
setFlyingEnabled(settings.value("enabledFlying").toBool());
Setting::Handle<bool> firstRunVal { Settings::firstRun, true };
setFlyingEnabled(firstRunVal.get() ? getFlyingEnabled() : 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());