From 8fe8ad59a2f8df4fb1b90ee7cb4d884d9b366920 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 9 Feb 2010 21:16:01 -0600 Subject: Ported some minor rendering engine changes from Snowglobe. --- linden/indra/newview/llviewerobject.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'linden/indra/newview/llviewerobject.cpp') diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 860052c..ca741c4 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -506,8 +506,6 @@ void LLViewerObject::setParent(LLViewerObject* parent) void LLViewerObject::addChild(LLViewerObject *childp) { - BOOL result = TRUE; - for (child_list_t::iterator i = mChildList.begin(); i != mChildList.end(); ++i) { if (*i == childp) @@ -525,16 +523,6 @@ void LLViewerObject::addChild(LLViewerObject *childp) childp->setParent(this); mChildList.push_back(childp); - if (!result) - { - llwarns << "Failed to attach child " << childp->getID() << " to object " << getID() << llendl; - removeChild(childp); - if (mJointInfo) - { - delete mJointInfo; - mJointInfo = NULL; - } - } } void LLViewerObject::removeChild(LLViewerObject *childp) @@ -637,8 +625,8 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); - if( old_parent != parentp && - old_parent || (parentp && parentp->isActive())) + if( (old_parent != parentp && old_parent) + || (parentp && parentp->isActive())) { // *TODO we should not be relying on setDrawable parent to call markMoved gPipeline.markMoved(mDrawable, FALSE); @@ -1814,7 +1802,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (cdp) { F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); - LLVector3 diff = getVelocity() * (0.5f*mTimeDilation*(gFrameDTClamped + ((F32)ping_delay)*0.001f)); + LLVector3 diff = getVelocity() * ping_delay; new_pos_parent += diff; } else -- cgit v1.1