summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmapmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r--indra/newview/llreflectionmapmanager.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 5a8f44f5c2..1762d7d5c1 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -119,8 +119,8 @@ void hdri_preview()
true);
}
-extern BOOL gCubeSnapshot;
-extern BOOL gTeleportDisplay;
+extern bool gCubeSnapshot;
+extern bool gTeleportDisplay;
static U32 sUpdateCount = 0;
@@ -551,17 +551,22 @@ void LLReflectionMapManager::getReflectionMaps(std::vector<LLReflectionMap*>& ma
LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* group)
{
- if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_VOLUME)
+ if (!group)
{
- OctreeNode* node = group->getOctreeNode();
- F32 size = node->getSize().getF32ptr()[0];
- if (size >= 15.f && size <= 17.f)
- {
- return addProbe(group);
- }
+ return nullptr;
}
-
- return nullptr;
+ LLSpatialPartition* part = group->getSpatialPartition();
+ if (!part || part->mPartitionType != LLViewerRegion::PARTITION_VOLUME)
+ {
+ return nullptr;
+ }
+ OctreeNode* node = group->getOctreeNode();
+ F32 size = node->getSize().getF32ptr()[0];
+ if (size < 15.f || size > 17.f)
+ {
+ return nullptr;
+ }
+ return addProbe(group);
}
LLReflectionMap* LLReflectionMapManager::registerViewerObject(LLViewerObject* vobj)
@@ -1385,7 +1390,7 @@ void LLReflectionMapManager::initReflectionMaps()
mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2);
mIrradianceMaps = new LLCubeMapArray();
- mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, FALSE);
+ mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, false);
}
// reset probe state