summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 96c839d918..7623ab56a5 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2496,10 +2496,10 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
gSavedSettings.setBOOL("GLTFEnabled", false);
}
- llassert(gAgent.getRegion());
- if (gAgent.getRegion() && gAgent.getRegion()->isCapabilityAvailable("ModifyRegion"))
+ if (features.has("PBRTerrainTransformsEnabled"))
{
- gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", true);
+ bool enabled = features["PBRTerrainTransformsEnabled"];
+ gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", enabled);
}
else
{
@@ -3147,16 +3147,24 @@ void LLViewerRegion::unpackRegionHandshake()
compp->setParamsReady();
}
- LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes)
+ std::string cap = getCapability("ModifyRegion"); // needed for queueQuery
+ if (cap.empty())
{
- if (!success) { return; }
- LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id);
- if (!region) { return; }
- LLVLComposition* compp = region->getComposition();
- if (!compp) { return; }
- compp->apply(composition_changes);
- LLFloaterRegionInfo::sRefreshFromRegion(region);
- });
+ LLFloaterRegionInfo::sRefreshFromRegion(this);
+ }
+ else
+ {
+ LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes)
+ {
+ if (!success) { return; }
+ LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id);
+ if (!region) { return; }
+ LLVLComposition* compp = region->getComposition();
+ if (!compp) { return; }
+ compp->apply(composition_changes);
+ LLFloaterRegionInfo::sRefreshFromRegion(region);
+ });
+ }
}