diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8a36417f0..6ff0a3093 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -704,6 +704,17 @@ Value 0 + LiruContinueFlyingOnUnsit + + Comment + Fly after standing up, if you were flying when you sat down + Persist + 1 + Type + Boolean + Value + 0 + LiruFlyAfterTeleport Comment diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 72a1fd25a..ba835d7ac 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -268,6 +268,7 @@ void LLPrefsAscentSys::refreshValues() mResetCameraAfterTP = gSavedSettings.getBOOL("OptionRotateCamAfterLocalTP"); mOffsetTPByUserHeight = gSavedSettings.getBOOL("OptionOffsetTPByAgentHeight"); mLiruFlyAfterTeleport = gSavedSettings.getBOOL("LiruFlyAfterTeleport"); + mLiruContinueFlying = gSavedSettings.getBOOL("LiruContinueFlyingOnUnsit"); mPreviewAnimInWorld = gSavedSettings.getBOOL("PreviewAnimInWorld"); mSaveScriptsAsMono = gSavedSettings.getBOOL("SaveInventoryScriptsAsMono"); mAlwaysRezInGroup = gSavedSettings.getBOOL("AscentAlwaysRezInGroup"); @@ -418,6 +419,7 @@ void LLPrefsAscentSys::cancel() gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP", mResetCameraAfterTP); gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight", mOffsetTPByUserHeight); gSavedSettings.setBOOL("LiruFlyAfterTeleport", mLiruFlyAfterTeleport); + gSavedSettings.setBOOL("LiruContinueFlyingOnUnsit", mLiruContinueFlying); gSavedSettings.setBOOL("PreviewAnimInWorld", mPreviewAnimInWorld); gSavedSettings.setBOOL("SaveInventoryScriptsAsMono", mSaveScriptsAsMono); gSavedSettings.setBOOL("AscentAlwaysRezInGroup", mAlwaysRezInGroup); diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h index 806325ff8..73765ee39 100644 --- a/indra/newview/ascentprefssys.h +++ b/indra/newview/ascentprefssys.h @@ -59,6 +59,7 @@ protected: BOOL mResetCameraAfterTP; BOOL mOffsetTPByUserHeight; bool mLiruFlyAfterTeleport; + bool mLiruContinueFlying; BOOL mPreviewAnimInWorld; BOOL mSaveScriptsAsMono; BOOL mAlwaysRezInGroup; diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 958f4f0e6..7df652c41 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -253,8 +253,11 @@ void audio_update_wind(bool force_update) // which is sufficient to completely turn off or turn on wind noise volume_delta = 1.f; } - // mute wind entirely when the user asked - if (gSavedSettings.getBOOL("MuteWind")) + + static LLCachedControl MuteWind("MuteWind"); + static LLCachedControl ContinueFlying("LiruContinueFlyingOnUnsit"); + // mute wind entirely when the user asked or when the user is seated, but flying + if (MuteWind || (ContinueFlying && gAgentAvatarp&& gAgentAvatarp->isSitting())) { // volume decreases by itself gAudiop->mMaxWindGain = 0.f; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c2bffd0aa..9200ef691 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5385,7 +5385,10 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) gAgentCamera.setForceMouselook(force_mouselook); // Forcing turning off flying here to prevent flying after pressing "Stand" // to stand up from an object. See EXT-1655. - gAgent.setFlying(FALSE); + // Unless the user wants to. + static LLCachedControl ContinueFlying("LiruContinueFlyingOnUnsit"); + if (!ContinueFlying) + gAgent.setFlying(FALSE); LLViewerObject* object = gObjectList.findObject(sitObjectID); if (object) diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index 026e99f8a..92759293b 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -5,37 +5,38 @@ - - - - + + - - - - - - - - - - - - - - + + + + seconds