From c0e2d4d988ba6d7d28bfa0487006349266e80709 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 11 Jul 2012 15:14:13 -0500 Subject: MAINT-794 Fix for assert on loading some types of objects before their parents. --- indra/newview/lldrawable.cpp | 3 +-- indra/newview/llviewerobject.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 82ea5cd5a6..4eda2b92b3 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -625,8 +625,6 @@ BOOL LLDrawable::updateMove() return FALSE; } - makeActive(); - BOOL done; if (isState(MOVE_UNDAMPED)) @@ -635,6 +633,7 @@ BOOL LLDrawable::updateMove() } else { + makeActive(); done = updateMoveDamped(); } return done; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index f5a3681437..b52c9d0d4b 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -782,7 +782,13 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) } LLDrawable* old_parent = mDrawable->mParent; mDrawable->mParent = parentp; - + + if (parentp && mDrawable->isActive()) + { + parentp->makeActive(); + parentp->setState(LLDrawable::ACTIVE_CHILD); + } + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); if( (old_parent != parentp && old_parent) || (parentp && parentp->isActive())) -- cgit v1.2.3