diff options
author | Palmer Truelson <palmer@lindenlab.com> | 2009-11-25 09:42:58 -0800 |
---|---|---|
committer | Palmer Truelson <palmer@lindenlab.com> | 2009-11-25 09:42:58 -0800 |
commit | bb614fa887ec7cadc5b370c1dcf412ae5cf662e1 (patch) | |
tree | 2ee594428704e0f4774f717d71485ee0bdde8748 /indra/newview/llagent.cpp | |
parent | 6d66910c6e2fbb25bf8b5c7b90e795f350342104 (diff) | |
parent | 57bc7dc44f31ef132a4abec228459c490c425eed (diff) |
Merge of viewer 2
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 78 |
1 files changed, 29 insertions, 49 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1257cf9789..2644235114 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -31,84 +31,54 @@ */ #include "llviewerprecompiledheaders.h" - #include "llagent.h" -#include "llagentwearables.h" + +#include "pipeline.h" #include "llagentlistener.h" +#include "llagentwearables.h" +#include "llagentui.h" + #include "llanimationstates.h" +#include "llbottomtray.h" #include "llcallingcard.h" +#include "llchannelmanager.h" #include "llconsole.h" -#include "lldrawable.h" #include "llfirstuse.h" -#include "llfloaterreg.h" -#include "llspeakers.h" #include "llfloatercamera.h" #include "llfloatercustomize.h" - -#include "llfloaterland.h" -#include "llfloatersnapshot.h" +#include "llfloaterreg.h" #include "llfloatertools.h" -#include "llfloaterworldmap.h" - #include "llgroupactions.h" - -#include "llfocusmgr.h" #include "llgroupmgr.h" #include "llhomelocationresponder.h" -#include "llimview.h" #include "llhudmanager.h" #include "lljoystickbutton.h" -#include "llmenugl.h" #include "llmorphview.h" #include "llmoveview.h" +#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state +#include "llnearbychatbar.h" #include "llparcel.h" -#include "llquantize.h" -#include "llrand.h" -#include "llregionhandle.h" #include "llsdutil.h" -#include "llselectmgr.h" +#include "llsidetray.h" #include "llsky.h" -#include "llslurl.h" #include "llsmoothstep.h" -#include "llsidetray.h" #include "llstatusbar.h" -#include "llteleportflags.h" -#include "llteleporthistory.h" -#include "lltexturestats.h" -#include "lltexturestats.h" #include "lltool.h" -#include "lltoolcomp.h" #include "lltoolmgr.h" -#include "lluictrlfactory.h" -#include "llurldispatcher.h" - -#include "llviewercamera.h" +#include "lltrans.h" +#include "llviewercontrol.h" #include "llviewerdisplay.h" +#include "llviewerjoystick.h" #include "llviewermediafocus.h" #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" -#include "llviewerwindow.h" -#include "llviewercontrol.h" -#include "llviewerjoystick.h" - #include "llvoavatarself.h" #include "llwindow.h" #include "llworld.h" #include "llworldmap.h" -#include "pipeline.h" -#include "lltrans.h" -#include "llbottomtray.h" -#include "llnearbychatbar.h" -#include "stringize.h" -#include "llcapabilitylistener.h" - -#include "llnavigationbar.h" //to show/hide navigation bar when changing mouse look state -#include "llagentui.h" -#include "llchannelmanager.h" - using namespace LLVOAvatarDefines; extern LLMenuBarGL* gMenuBarView; @@ -764,6 +734,10 @@ BOOL LLAgent::canFly() return parcel->getAllowFly(); } +BOOL LLAgent::getFlying() const +{ + return mControlFlags & AGENT_CONTROL_FLY; +} //----------------------------------------------------------------------------- // setFlying() @@ -821,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(); @@ -2825,7 +2799,8 @@ void LLAgent::endAnimationUpdateUI() LLBottomTray::getInstance()->setVisible(TRUE); - LLSideTray::getInstance()->setVisible(TRUE); + LLSideTray::getInstance()->getButtonsPanel()->setVisible(TRUE); + LLSideTray::getInstance()->updateSidetrayVisibility(); LLPanelStandStopFlying::getInstance()->setVisible(TRUE); @@ -2840,7 +2815,11 @@ void LLAgent::endAnimationUpdateUI() LLFloaterReg::restoreVisibleInstances(); #else // Use this for now LLFloaterView::skip_list_t skip_list; - skip_list.insert(LLFloaterReg::findInstance("mini_map")); + if (LLFloaterReg::findInstance("mini_map")) + { + skip_list.insert(LLFloaterReg::findInstance("mini_map")); + } + gFloaterView->popVisibleAll(skip_list); #endif mViewsPushed = FALSE; @@ -2919,7 +2898,8 @@ void LLAgent::endAnimationUpdateUI() LLBottomTray::getInstance()->setVisible(FALSE); - LLSideTray::getInstance()->setVisible(FALSE); + LLSideTray::getInstance()->getButtonsPanel()->setVisible(FALSE); + LLSideTray::getInstance()->updateSidetrayVisibility(); LLPanelStandStopFlying::getInstance()->setVisible(FALSE); @@ -6356,7 +6336,7 @@ void LLAgent::sendAgentSetAppearance() msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); } msg->nextBlockFast(_PREHASH_ObjectData); - mAvatarObject->packTEMessage( gMessageSystem ); + mAvatarObject->sendAppearanceMessage( gMessageSystem ); } else { |