Fix for various TP where a mirror is present

these manifest as crashes in isDynamic, isBox and similar calls that are accessed through a dangling probe.
master
Beq 2024-07-01 17:13:15 +01:00
parent c63cfaa15d
commit fcc7d16108
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()
{