Commit 60990a5e authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Add force enable fly option

parent 059fd356
......@@ -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>
......
......@@ -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;
......
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment