summaryrefslogtreecommitdiff
path: root/indra/newview/llcontrolavatar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-10 03:50:44 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-10 03:50:44 +0300
commit0acee937f55e6d1a198be2549d5cb55a0403dd4d (patch)
tree2deaa98bcd99fd2860da758a92816c3bdb838acd /indra/newview/llcontrolavatar.cpp
parenta902138de15067a86a6aeb02fdabd094873da0b2 (diff)
parentda9a1dcb55548a249ff7a1255f3e518696b81245 (diff)
Merge branch 'main' into marchcat/c-merge
# Conflicts: # indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
Diffstat (limited to 'indra/newview/llcontrolavatar.cpp')
-rw-r--r--indra/newview/llcontrolavatar.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 7def9c045f..d764f64c79 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -99,7 +99,6 @@ LLVOAvatar *LLControlAvatar::getAttachedAvatar()
void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_scale_fixup) const
{
-
F32 max_legal_offset = MAX_LEGAL_OFFSET;
if (gSavedSettings.getControl("AnimatedObjectsMaxLegalOffset"))
{
@@ -362,6 +361,9 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
void LLControlAvatar::markForDeath()
{
mMarkedForDeath = true;
+ // object unlinked cav and might be dead already
+ // might need to clean mControlAVBridge here as well
+ mRootVolp = NULL;
}
void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
@@ -379,6 +381,7 @@ void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
void LLControlAvatar::markDead()
{
+ mRootVolp = NULL;
super::markDead();
mControlAVBridge = NULL;
}
@@ -439,7 +442,7 @@ void LLControlAvatar::updateDebugText()
F32 streaming_cost = 0.f;
std::string cam_dist_string = "";
S32 cam_dist_count = 0;
- F32 lod_radius = mRootVolp->mLODRadius;
+ F32 lod_radius = mRootVolp ? mRootVolp->mLODRadius : 0.f;
for (std::vector<LLVOVolume*>::iterator it = volumes.begin();
it != volumes.end(); ++it)