summaryrefslogtreecommitdiff
path: root/indra/newview/llheroprobemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llheroprobemanager.cpp')
-rw-r--r--indra/newview/llheroprobemanager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index a105fd2fa8..c66054f618 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -126,7 +126,7 @@ void LLHeroProbeManager::update()
for (auto vo : mHeroVOList)
{
- if (vo)
+ if (vo && !vo->isDead())
{
if (vo->mDrawable.notNull())
{
@@ -148,7 +148,7 @@ void LLHeroProbeManager::update()
}
}
- if (mNearestHero != nullptr && mNearestHero->mDrawable.notNull())
+ if (mNearestHero != nullptr && !mNearestHero->isDead() && mNearestHero->mDrawable.notNull())
{
LLVector3 hero_pos = mNearestHero->getPositionAgent();
LLVector3 face_normal = LLVector3(0, 0, 1);
@@ -168,6 +168,10 @@ void LLHeroProbeManager::update()
probe_pos.load3(point.mV);
}
+ else
+ {
+ mNearestHero = nullptr;
+ }
mHeroProbeStrength = 1;
}