summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmap.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-15 18:20:47 +0300
committerGitHub <noreply@github.com>2024-06-15 18:20:47 +0300
commit847a8458ecbcefd989a02c727e50f96c606d9d39 (patch)
tree1561a55fe1e62356089d4912cd8216cc15b57e09 /indra/newview/llreflectionmap.cpp
parentc4fc76efefd12c7cb1224dc8a748da2958f4a7f0 (diff)
parentbfadb935560003e94197a0c9532a7ba086c6720a (diff)
Merge pull request #1774 from secondlife/marchcat/b-merge
Release (Materials featurette) -> Maint B sync
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r--indra/newview/llreflectionmap.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 90a2f30c92..2604c2ba53 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -49,7 +49,7 @@ LLReflectionMap::~LLReflectionMap()
}
}
-void LLReflectionMap::update(U32 resolution, U32 face)
+void LLReflectionMap::update(U32 resolution, U32 face, bool force_dynamic, F32 near_clip, bool useClipPlane, LLPlane clipPlane)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
mLastUpdateTime = gFrameTimeSeconds;
@@ -63,7 +63,10 @@ void LLReflectionMap::update(U32 resolution, U32 face)
{
resolution /= 2;
}
- gViewerWindow->cubeSnapshot(LLVector3(mOrigin), mCubeArray, mCubeIndex, face, getNearClip(), getIsDynamic());
+
+ F32 clip = (near_clip > 0) ? near_clip : getNearClip();
+
+ gViewerWindow->cubeSnapshot(LLVector3(mOrigin), mCubeArray, mCubeIndex, face, clip, getIsDynamic() || force_dynamic, useClipPlane, clipPlane);
}
void LLReflectionMap::autoAdjustOrigin()
@@ -165,7 +168,7 @@ void LLReflectionMap::autoAdjustOrigin()
}
}
- else if (mViewerObject)
+ else if (mViewerObject && !mViewerObject->isDead())
{
mPriority = 1;
mOrigin.load3(mViewerObject->getPositionAgent().mV);