Merge pull request #1899 from beqjanus/fix-mirror-crashes

Fix for various TP where a mirror is present
master
Brad Linden 2024-07-01 14:32:14 -07:00 committed by GitHub
commit 817a1321db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -121,6 +121,7 @@ void LLHeroProbeManager::update()
// Find our nearest hero candidate.
float last_distance = 99999.f;
float camera_center_distance = 99999.f;
mNearestHero = nullptr;
for (auto vo : mHeroVOList)
{
if (vo && !vo->isDead() && vo->mDrawable.notNull() && vo->isReflectionProbe() && vo->getReflectionProbeIsBox())
@ -194,11 +195,17 @@ void LLHeroProbeManager::update()
else
{
mNearestHero = nullptr;
mDefaultProbe->mViewerObject = nullptr;
}
mHeroProbeStrength = 1;
}
else
{
mNearestHero = nullptr;
mDefaultProbe->mViewerObject = nullptr;
}
}
void LLHeroProbeManager::renderProbes()
{