summaryrefslogtreecommitdiff
path: root/indra/newview/llcontrolavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-27 20:24:15 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-27 20:24:15 +0100
commit7af46e7fe37552175c46a9366e9574bb9c716a68 (patch)
treec62c16c8f5a7df282001b86091212de8a0a121a3 /indra/newview/llcontrolavatar.cpp
parentb6aedb116f60b9e4823f61b945b3f374d9267c1d (diff)
SL-722 - defer markDead() for LLControlAvatar when unlinking. Fixes asset crash in pipeline. Also added various checks for mDrawable null in llvoavatar.cpp.
Diffstat (limited to 'indra/newview/llcontrolavatar.cpp')
-rw-r--r--indra/newview/llcontrolavatar.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 26c4865e4c..6fc3d52fe7 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -35,7 +35,8 @@
LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) :
LLVOAvatar(id, pcode, regionp),
mPlaying(false),
- mGlobalScale(1.0f)
+ mGlobalScale(1.0f),
+ mMarkedForDeath(false)
{
mIsControlAvatar = true;
mEnableDefaultMotions = false;
@@ -155,7 +156,6 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
cav->mSpecialRenderMode = 1;
cav->updateJointLODs();
cav->updateGeometry(cav->mDrawable);
- //cav->startMotion(ANIM_AGENT_STAND, 5.0f);
cav->hideSkirt();
// Sync up position/rotation with object
@@ -164,3 +164,23 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
return cav;
}
+void LLControlAvatar::markForDeath()
+{
+ mMarkedForDeath = true;
+}
+
+// static
+void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
+{
+ if (mMarkedForDeath)
+ {
+ markDead();
+ mMarkedForDeath = false;
+ }
+ else
+ {
+ LLVOAvatar::idleUpdate(agent,time);
+ }
+}
+
+