summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp49
1 files changed, 39 insertions, 10 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index c9bd7851ed..7d908df5ce 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -56,14 +56,15 @@
#include "llparcel.h"
#include "llrendersphere.h"
#include "llsdutil.h"
-#include "llsidetray.h"
#include "llsky.h"
#include "llsmoothstep.h"
+#include "llstartup.h"
#include "llstatusbar.h"
#include "llteleportflags.h"
#include "lltool.h"
#include "lltoolmgr.h"
#include "lltrans.h"
+#include "llurlentry.h"
#include "llviewercontrol.h"
#include "llviewerdisplay.h"
#include "llviewerjoystick.h"
@@ -218,7 +219,10 @@ LLAgent::LLAgent() :
mFirstLogin(FALSE),
mGenderChosen(FALSE),
- mAppearanceSerialNum(0)
+ mAppearanceSerialNum(0),
+
+ mMouselookModeInSignal(NULL),
+ mMouselookModeOutSignal(NULL)
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{
@@ -269,6 +273,9 @@ LLAgent::~LLAgent()
{
cleanup();
+ delete mMouselookModeInSignal;
+ delete mMouselookModeOutSignal;
+
// *Note: this is where LLViewerCamera::getInstance() used to be deleted.
}
@@ -637,9 +644,16 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
// Update all of the regions.
LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal);
}
+
+ // Pass new region along to metrics components that care about this level of detail.
+ LLAppViewer::metricsUpdateRegion(regionp->getHandle());
}
mRegionp = regionp;
+ // Pass the region host to LLUrlEntryParcel to resolve parcel name
+ // with a server request.
+ LLUrlEntryParcel::setRegionHost(getRegionHost());
+
// Must shift hole-covering water object locations because local
// coordinate frame changed.
LLWorld::getInstance()->updateWaterObjects();
@@ -1726,15 +1740,17 @@ void LLAgent::endAnimationUpdateUI()
LLBottomTray::getInstance()->onMouselookModeOut();
- LLSideTray::getInstance()->getButtonsPanel()->setVisible(TRUE);
- LLSideTray::getInstance()->updateSidetrayVisibility();
-
LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
LLFloaterCamera::onLeavingMouseLook();
+ if (mMouselookModeOutSignal)
+ {
+ (*mMouselookModeOutSignal)();
+ }
+
// Only pop if we have pushed...
if (TRUE == mViewsPushed)
{
@@ -1828,9 +1844,6 @@ void LLAgent::endAnimationUpdateUI()
LLBottomTray::getInstance()->onMouselookModeIn();
- LLSideTray::getInstance()->getButtonsPanel()->setVisible(FALSE);
- LLSideTray::getInstance()->updateSidetrayVisibility();
-
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
// clear out camera lag effect
@@ -1843,6 +1856,11 @@ void LLAgent::endAnimationUpdateUI()
mViewsPushed = TRUE;
+ if (mMouselookModeInSignal)
+ {
+ (*mMouselookModeInSignal)();
+ }
+
// hide all floaters except the mini map
#if 0 // Use this once all floaters are registered
@@ -1902,7 +1920,6 @@ void LLAgent::endAnimationUpdateUI()
}
}
}
-
}
else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
{
@@ -1934,6 +1951,18 @@ void LLAgent::endAnimationUpdateUI()
gAgentCamera.updateLastCamera();
}
+boost::signals2::connection LLAgent::setMouselookModeInCallback( const camera_signal_t::slot_type& cb )
+{
+ if (!mMouselookModeInSignal) mMouselookModeInSignal = new camera_signal_t();
+ return mMouselookModeInSignal->connect(cb);
+}
+
+boost::signals2::connection LLAgent::setMouselookModeOutCallback( const camera_signal_t::slot_type& cb )
+{
+ if (!mMouselookModeOutSignal) mMouselookModeOutSignal = new camera_signal_t();
+ return mMouselookModeOutSignal->connect(cb);
+}
+
//-----------------------------------------------------------------------------
// heardChat()
//-----------------------------------------------------------------------------
@@ -2452,7 +2481,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
BOOL LLAgent::canJoinGroups() const
{
- return mGroups.count() < MAX_AGENT_GROUPS;
+ return mGroups.count() < gMaxAgentGroups;
}
LLQuaternion LLAgent::getHeadRotation()