diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llagent.cpp | 23 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llagent.h | 1 | ||||
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 4 |
3 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9eb2723dcf..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() //----------------------------------------------------------------------------- @@ -908,11 +920,14 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // If the newly entered region is using server bakes, and our // current appearance is non-baked, request appearance update from // server. - if (isAgentAvatarValid() && - !gAgentAvatarp->isUsingServerBakes() && - (mRegionp->getCentralBakeVersion()>0)) + if (mRegionp->capabilitiesReceived()) { - LLAppearanceMgr::instance().requestServerAppearanceUpdate(); + handleServerBakeRegionTransition(mRegionp->getRegionID()); + } + else + { + // Need to handle via callback after caps arrive. + mRegionp->setCapabilitiesReceivedCallback(boost::bind(&LLAgent::handleServerBakeRegionTransition,this,_1)); } } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index ae5efb2287..693c123851 100644..100755 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -610,6 +610,7 @@ private: void handleTeleportFinished(); void handleTeleportFailed(); + void handleServerBakeRegionTransition(const LLUUID& region_id); //-------------------------------------------------------------------- // Teleport State diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c57269d0b0..7a8586ebdc 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2677,6 +2677,10 @@ void LLAppearanceMgr::requestServerAppearanceUpdate() { llwarns << "Region not set, cannot request server appearance update" << llendl; } + if (gAgent.getRegion()->getCentralBakeVersion()==0) + { + llwarns << "Region does not support baking" << llendl; + } std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance"); if (url.empty()) { |