diff options
author | Jacek Antonelli | 2010-02-09 21:16:01 -0600 |
---|---|---|
committer | Jacek Antonelli | 2010-02-16 18:50:22 -0600 |
commit | 8fe8ad59a2f8df4fb1b90ee7cb4d884d9b366920 (patch) | |
tree | 2bfd446fe29250cbd31cb912f952fe2c2ab05c68 /linden/indra/newview/llviewerobject.cpp | |
parent | Ported some stats and texture console changes from Snowglobe. (diff) | |
download | meta-impy-8fe8ad59a2f8df4fb1b90ee7cb4d884d9b366920.zip meta-impy-8fe8ad59a2f8df4fb1b90ee7cb4d884d9b366920.tar.gz meta-impy-8fe8ad59a2f8df4fb1b90ee7cb4d884d9b366920.tar.bz2 meta-impy-8fe8ad59a2f8df4fb1b90ee7cb4d884d9b366920.tar.xz |
Ported some minor rendering engine changes from Snowglobe.
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewerobject.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
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) | |||
506 | 506 | ||
507 | void LLViewerObject::addChild(LLViewerObject *childp) | 507 | void LLViewerObject::addChild(LLViewerObject *childp) |
508 | { | 508 | { |
509 | BOOL result = TRUE; | ||
510 | |||
511 | for (child_list_t::iterator i = mChildList.begin(); i != mChildList.end(); ++i) | 509 | for (child_list_t::iterator i = mChildList.begin(); i != mChildList.end(); ++i) |
512 | { | 510 | { |
513 | if (*i == childp) | 511 | if (*i == childp) |
@@ -525,16 +523,6 @@ void LLViewerObject::addChild(LLViewerObject *childp) | |||
525 | childp->setParent(this); | 523 | childp->setParent(this); |
526 | mChildList.push_back(childp); | 524 | mChildList.push_back(childp); |
527 | 525 | ||
528 | if (!result) | ||
529 | { | ||
530 | llwarns << "Failed to attach child " << childp->getID() << " to object " << getID() << llendl; | ||
531 | removeChild(childp); | ||
532 | if (mJointInfo) | ||
533 | { | ||
534 | delete mJointInfo; | ||
535 | mJointInfo = NULL; | ||
536 | } | ||
537 | } | ||
538 | } | 526 | } |
539 | 527 | ||
540 | void LLViewerObject::removeChild(LLViewerObject *childp) | 528 | void LLViewerObject::removeChild(LLViewerObject *childp) |
@@ -637,8 +625,8 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) | |||
637 | 625 | ||
638 | BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL); | 626 | BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL); |
639 | gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); | 627 | gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); |
640 | if( old_parent != parentp && | 628 | if( (old_parent != parentp && old_parent) |
641 | old_parent || (parentp && parentp->isActive())) | 629 | || (parentp && parentp->isActive())) |
642 | { | 630 | { |
643 | // *TODO we should not be relying on setDrawable parent to call markMoved | 631 | // *TODO we should not be relying on setDrawable parent to call markMoved |
644 | gPipeline.markMoved(mDrawable, FALSE); | 632 | gPipeline.markMoved(mDrawable, FALSE); |
@@ -1814,7 +1802,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | |||
1814 | if (cdp) | 1802 | if (cdp) |
1815 | { | 1803 | { |
1816 | F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); | 1804 | F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped); |
1817 | LLVector3 diff = getVelocity() * (0.5f*mTimeDilation*(gFrameDTClamped + ((F32)ping_delay)*0.001f)); | 1805 | LLVector3 diff = getVelocity() * ping_delay; |
1818 | new_pos_parent += diff; | 1806 | new_pos_parent += diff; |
1819 | } | 1807 | } |
1820 | else | 1808 | else |