diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml index 10c4a025c5ce0aaee5025208db3b440005ca7d1a..9ed67d0684a666ed29d831aa4e812ee34561f607 100644 --- a/indra/newview/app_settings/settings_alchemy.xml +++ b/indra/newview/app_settings/settings_alchemy.xml @@ -266,6 +266,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>AlchemyForceFly</key> + <map> + <key>Comment</key> + <string>Always allow flight</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>AlchemyHudTextFadeDistance</key> <map> <key>Comment</key> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index b5ab25cb1506b5e37da71980e6a036c0e6b5494f..827d86f6011f43e84e8a567ab68827b5f52d1286 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -787,6 +787,9 @@ BOOL LLAgent::canFly() // [/RLVa:KB] if (isGodlike()) return TRUE; + static LLCachedControl<bool> alchemy_force_fly(gSavedSettings, "AlchemyForceFly", false); + if (alchemy_force_fly) return TRUE; + LLViewerRegion* regionp = getRegion(); if (regionp && regionp->getBlockFly()) return FALSE; diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 0dcc44307f5fa8563130df28b089fc94c6d77c6d..ff0fa485bc41dc16b7639771774c35241c1c43d4 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -28,6 +28,7 @@ #include "llviewerinput.h" +#include "alcontrolcache.h" #include "llappviewer.h" #include "llfloaterreg.h" #include "llmath.h" @@ -87,7 +88,7 @@ bool agent_jump( EKeystate s ) if( time < FLY_TIME || frame_count <= FLY_FRAMES || gAgent.upGrabbed() - || !gSavedSettings.getBOOL("AutomaticFly")) + || !ALControlCache::AutomaticFly) { gAgent.moveUp(1); }