summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-02-01 22:14:56 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-02-01 22:14:56 +0200
commitf047e2236c240aab0a633b147818b79b6746b2c5 (patch)
treeac67c13356c08300df9e7c61bab700ab73e25a3b /indra/newview/llenvironment.cpp
parent0d324bb24db49f6f28d7e7f14fd69e7676de8fe6 (diff)
parent21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff)
Merge branch 'master' into DRTVWR-522-maint
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 13e29b90fc..02a5d52548 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1029,7 +1029,7 @@ void LLEnvironment::onRegionChange()
}
if (!cur_region->capabilitiesReceived())
{
- cur_region->setCapabilitiesReceivedCallback([](LLUUID region_id) { LLEnvironment::instance().requestRegion(); });
+ cur_region->setCapabilitiesReceivedCallback([](const LLUUID &region_id) { LLEnvironment::instance().requestRegion(); });
return;
}
requestRegion();
@@ -1668,6 +1668,17 @@ void LLEnvironment::updateShaderUniforms(LLGLSLShader *shader)
void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envinfo, LLSettingsBase::Seconds transition)
{
+ if (!gAgent.getRegion())
+ {
+ return;
+ }
+ // mRegionId id can be null, no specification as to why and if it's valid so check valid ids only
+ if (gAgent.getRegion()->getRegionID() != envinfo->mRegionId && envinfo->mRegionId.notNull())
+ {
+ LL_INFOS("ENVIRONMENT") << "Requested environmend region id: " << envinfo->mRegionId << " agent is on: " << gAgent.getRegion()->getRegionID() << LL_ENDL;
+ return;
+ }
+
if (envinfo->mParcelId == INVALID_PARCEL_ID)
{
// the returned info applies to an entire region.