diff options
| author | Loren Shih <seraph@lindenlab.com> | 2009-11-23 15:16:19 -0500 | 
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2009-11-23 15:16:19 -0500 | 
| commit | 0c3bd94da9ba2244613b6c1f1f0e4ce9723c46d3 (patch) | |
| tree | 51e49fabfdf507dd95e5c944327fbaa18e4a876d | |
| parent | 7e181025c0dc31db2d2d4eb6ccb17ee83f4dc27c (diff) | |
EXT-2435 : Advanced > Shortcuts > Fly is always ticked
Did a few lines of cleanup for code surrounding this.  Issue is still not fixed though.
--HG--
branch : avatar-pipeline
| -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 | 
