summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-07-11 15:14:13 -0500
committerDave Parks <davep@lindenlab.com>2012-07-11 15:14:13 -0500
commitc0e2d4d988ba6d7d28bfa0487006349266e80709 (patch)
tree0aff6203a30294c73078f81aec0212ecbde0d1bd
parente5d2ddc4843c5ecee4a735bd409b41cbf0d438eb (diff)
MAINT-794 Fix for assert on loading some types of objects before their parents.
-rw-r--r--indra/newview/lldrawable.cpp3
-rw-r--r--indra/newview/llviewerobject.cpp8
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()))