summaryrefslogtreecommitdiff
path: root/indra/newview/llcontrolavatar.cpp
diff options
context:
space:
mode:
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);
+ }
+}
+
+