From fa1d6066a11fae064ef577795c354b89beb352c3 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 15 Feb 2023 12:06:57 -0600
Subject: [PATCH] SL-19220 Have manual sphere probes live-track their
 associated LLViewerObjects

---
 indra/newview/llreflectionmapmanager.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index fd2906fa373..8f342fc0bb2 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -799,8 +799,10 @@ void LLReflectionMapManager::updateUniforms()
         llassert(refmap->mCubeIndex >= 0); // should always be  true, if not, getReflectionMaps is bugged
 
         {
-            //LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmsu - refSphere");
-
+            if (refmap->mViewerObject)
+            { // have active manual probes live-track the object they're associated with
+                refmap->mOrigin.load3(refmap->mViewerObject->getPositionAgent().mV);
+            }
             modelview.affineTransform(refmap->mOrigin, oa);
             rpd.refSphere[count].set(oa.getF32ptr());
             rpd.refSphere[count].mV[3] = refmap->mRadius;
-- 
GitLab