diff options
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 3c79045cc5..b5642d07a5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -861,6 +861,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 60: this_update_precision = 32; // this is a terse update @@ -900,6 +901,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 32: this_update_precision = 16; test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT); @@ -1172,6 +1174,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 60: // this is a terse 32 update // pos @@ -1211,6 +1214,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 32: // this is a terse 16 update this_update_precision = 16; @@ -1997,6 +2001,9 @@ BOOL LLViewerObject::isActive() const BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { + static LLFastTimer::DeclareTimer ftm("Viewer Object"); + LLFastTimer t(ftm); + if (mDead) { // It's dead. Don't update it. @@ -4015,9 +4022,14 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const { LLVector3 position_agent; LLQuaternion rot; + LLViewerObject* avatar_parent = NULL; LLViewerObject* root_edit = (LLViewerObject*)getRootEdit(); - LLViewerObject* avatar_parent = (LLViewerObject*)root_edit->getParent(); - if (avatar_parent && avatar_parent->isAvatar() && root_edit->mDrawable.notNull()) + if (root_edit) + { + avatar_parent = (LLViewerObject*)root_edit->getParent(); + } + + if (avatar_parent && avatar_parent->isAvatar() && root_edit && root_edit->mDrawable.notNull()) { LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent(); position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition(); |