summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2012-11-15 15:20:46 -0500
committerLogan Dethrow <log@lindenlab.com>2012-11-15 15:20:46 -0500
commit79dbaed1581a5d8212caebf6b6a3672660e2f5a9 (patch)
treec3c539a8ce3ccfb4d7d1a66b58b56fce9b5c293b /indra/newview/llagent.cpp
parentf93604c399c889e06980554e1cb59a833e7f847d (diff)
parent51a016a0cc6928dd2a685ce22dd6475e2610a5c5 (diff)
Merge lindenlab/sunshine-internal -> log/sunshine-internal
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3e26eac59a..c49caf93be 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -809,6 +809,18 @@ void LLAgent::standUp()
}
+void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id)
+{
+ llinfos << "called" << llendl;
+
+ if (isAgentAvatarValid() &&
+ !gAgentAvatarp->isUsingServerBakes() &&
+ (mRegionp->getCentralBakeVersion()>0))
+ {
+ LLAppearanceMgr::instance().requestServerAppearanceUpdate();
+ }
+}
+
//-----------------------------------------------------------------------------
// setRegion()
//-----------------------------------------------------------------------------
@@ -904,6 +916,19 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
{
LLEnvManagerNew::instance().onRegionCrossing();
}
+
+ // If the newly entered region is using server bakes, and our
+ // current appearance is non-baked, request appearance update from
+ // server.
+ if (mRegionp->capabilitiesReceived())
+ {
+ handleServerBakeRegionTransition(mRegionp->getRegionID());
+ }
+ else
+ {
+ // Need to handle via callback after caps arrive.
+ mRegionp->setCapabilitiesReceivedCallback(boost::bind(&LLAgent::handleServerBakeRegionTransition,this,_1));
+ }
}