diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llagent.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index fb2ecb3bed..9b3e97e8d8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -734,6 +734,10 @@ BOOL LLAgent::canFly() return parcel->getAllowFly(); } +BOOL LLAgent::getFlying() const +{ + return mControlFlags & AGENT_CONTROL_FLY; +} //----------------------------------------------------------------------------- // setFlying() @@ -791,7 +795,7 @@ void LLAgent::setFlying(BOOL fly) // static void LLAgent::toggleFlying() { - BOOL fly = !(gAgent.mControlFlags & AGENT_CONTROL_FLY); + BOOL fly = !gAgent.getFlying(); gAgent.setFlying( fly ); gAgent.resetView(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 4162dfce1e..2e95dc72be 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -310,7 +310,7 @@ private: // Fly //-------------------------------------------------------------------- public: - BOOL getFlying() const { return mControlFlags & AGENT_CONTROL_FLY; } + BOOL getFlying() const; void setFlying(BOOL fly); static void toggleFlying(); static bool enableFlying(); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 8ab5fb1659..2b101e9058 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1709,6 +1709,8 @@ layout="topleft" name="Fly" shortcut="Home"> + <menu_item_check.on_check + function="Agent.getFlying" /> <menu_item_check.on_click function="Agent.toggleFlying" /> <menu_item_check.on_enable |