summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp29
1 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ec2f490742..e3f2afadc5 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4575,6 +4575,11 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
}
}
+ if (getClickAction() == CLICK_ACTION_IGNORE && !LLFloater::isVisible(gFloaterTools))
+ {
+ return FALSE;
+ }
+
BOOL ret = FALSE;
LLVolume* volume = getVolume();
@@ -5262,8 +5267,9 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
//drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD)));
- U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0;
- U8 shiny = facep->getTextureEntry()->getShiny();
+ const LLTextureEntry* te = facep->getTextureEntry();
+ U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? te->getBumpmap() : 0;
+ U8 shiny = te->getShiny();
LLViewerTexture* tex = facep->getTexture();
@@ -5273,22 +5279,22 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
LLUUID mat_id;
- auto* gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial();
- llassert(gltf_mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(facep->getTextureEntry()->getGLTFRenderMaterial()) != nullptr);
+ auto* gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial();
+ llassert(gltf_mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(te->getGLTFRenderMaterial()) != nullptr);
if (gltf_mat != nullptr)
{
mat_id = gltf_mat->getHash(); // TODO: cache this hash
- if (!facep->hasMedia())
+ if (!facep->hasMedia() || (tex && tex->getType() != LLViewerTexture::MEDIA_TEXTURE))
{ // no media texture, face texture will be unused
tex = nullptr;
}
}
else
{
- mat = facep->getTextureEntry()->getMaterialParams().get();
+ mat = te->getMaterialParams().get();
if (mat)
{
- mat_id = facep->getTextureEntry()->getMaterialParams()->getHash();
+ mat_id = te->getMaterialParams()->getHash();
}
}
@@ -5298,7 +5304,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
if (mat)
{
- BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
+ BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
if (type == LLRenderPass::PASS_ALPHA)
{
shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
@@ -5494,6 +5500,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
llassert(!gCubeSnapshot);
+ if (group->isDead())
+ {
+ return;
+ }
+
if (group->changeLOD())
{
group->mLastUpdateDistance = group->mDistance;
@@ -5577,7 +5588,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LLVOVolume* vobj = drawablep->getVOVolume();
- if (!vobj)
+ if (!vobj || vobj->isDead())
{
continue;
}