diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-09-17 20:34:43 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-09-17 20:34:43 +0100 |
commit | c5a2aa0028ea1a31ec2c09f849dd6cb807c7340a (patch) | |
tree | 63e96e4bb7eb3b4378d90045b2f6df6c617d25cf | |
parent | e4e4ad3c09bdc06f738f60bbfd7899036ad6553f (diff) |
SL-9671 - refresh simulator features on region change
-rw-r--r-- | indra/newview/llagent.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 901294d6b4..d656d0b16c 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -881,6 +881,16 @@ void LLAgent::setRegion(LLViewerRegion *regionp) { gSky.mVOGroundp->setRegion(regionp); } + + if (regionp->capabilitiesReceived()) + { + regionp->requestSimulatorFeatures(); + } + else + { + regionp->setCapabilitiesReceivedCallback(boost::bind(&LLViewerRegion::requestSimulatorFeatures, regionp)); + } + } else { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 92e1d86365..527c8e61f2 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2151,6 +2151,8 @@ void LLViewerRegion::getInfo(LLSD& info) void LLViewerRegion::requestSimulatorFeatures() { + LL_DEBUGS("SimulatorFeatures") << "region " << getName() << " ptr " << this + << " trying to request SimulatorFeatures" << LL_ENDL; // kick off a request for simulator features std::string url = getCapability("SimulatorFeatures"); if (!url.empty()) @@ -2198,7 +2200,7 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) std::stringstream str; LLSDSerialize::toPrettyXML(sim_features, str); - LL_INFOS() << str.str() << LL_ENDL; + LL_INFOS() << "region " << getName() << " " << str.str() << LL_ENDL; mSimulatorFeatures = sim_features; setSimulatorFeaturesReceived(true); |