Allow turning flying on and off while seated, if using Continue Fly On Unsit
Note: Redundant code, but these functions will likely be merged eventually(FUI-esque project), so it doesn't matter for now.
This commit is contained in:
@@ -666,11 +666,13 @@ void LLAgent::setFlying(BOOL fly)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Singu Note: We don't take off while sitting, don't bother with this check, let us toggle fly whenever.
|
||||
// don't allow taking off while sitting
|
||||
if (fly && gAgentAvatarp->isSitting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
if (fly)
|
||||
|
||||
@@ -307,7 +307,12 @@ void LLToolBar::refresh()
|
||||
setVisible(show && !mouselook);
|
||||
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgentAvatarp)
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
if (continue_flying_on_unsit)
|
||||
{
|
||||
sitting = false;
|
||||
}
|
||||
else if (gAgentAvatarp)
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
|
||||
@@ -3984,7 +3984,12 @@ class LLWorldEnableFly : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgentAvatarp)
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
if (continue_flying_on_unsit)
|
||||
{
|
||||
sitting = false;
|
||||
}
|
||||
else if (gAgentAvatarp)
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user