diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-01-07 10:39:05 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-01-07 10:39:05 -0500 |
| commit | e1e38c4cee980f815091cd94c8a529ffe3e24918 (patch) | |
| tree | 35b16f61bd120f83bb74a77d4417dce1108e0542 /indra/newview/llagent.cpp | |
| parent | c02d6a319f378d5dcc34c51b20f556f175d2a40a (diff) | |
| parent | 09c01c4e925833873a83665fe0642637b65e547e (diff) | |
merge changes for storm-34
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 001a6a8851..77552663ab 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -218,7 +218,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 +272,9 @@ LLAgent::~LLAgent() { cleanup(); + delete mMouselookModeInSignal; + delete mMouselookModeOutSignal; + // *Note: this is where LLViewerCamera::getInstance() used to be deleted. } @@ -637,6 +643,9 @@ 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; @@ -1732,6 +1741,11 @@ void LLAgent::endAnimationUpdateUI() LLFloaterCamera::onLeavingMouseLook(); + if (mMouselookModeOutSignal) + { + (*mMouselookModeOutSignal)(); + } + // Only pop if we have pushed... if (TRUE == mViewsPushed) { @@ -1837,6 +1851,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 @@ -1896,7 +1915,6 @@ void LLAgent::endAnimationUpdateUI() } } } - } else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { @@ -1928,6 +1946,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() //----------------------------------------------------------------------------- |
