MAINT-775 More edge case cleanup -- spinning child prims still break on deselect until the next LoD update

meow-7.2.2
Dave Parks 2012-04-20 00:58:55 -05:00
parent d953cce386
commit 5ef21ba6c5
4 changed files with 29 additions and 15 deletions

View File

@ -551,6 +551,8 @@ F32 LLDrawable::updateXform(BOOL undamped)
LLVector3 vec = mCurrentScale-target_scale;
if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED)
{ //scale change requires immediate rebuild
mCurrentScale = target_scale;
@ -564,7 +566,12 @@ F32 LLDrawable::updateXform(BOOL undamped)
if (!isState(LLDrawable::ANIMATED_CHILD))
{
setState(LLDrawable::ANIMATED_CHILD);
gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);
gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE);
LLSpatialGroup* group = getSpatialGroup();
if (group)
{
gPipeline.markRebuild(group, TRUE);
}
}
}
else if (!getVOVolume() && !isAvatar())
@ -577,7 +584,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
mXform.setRotation(target_rot);
mXform.setScale(LLVector3(1,1,1)); //no scale in drawable transforms (IT'S A RULE!)
mXform.updateMatrix();
if (mSpatialBridge)
{
gPipeline.markMoved(mSpatialBridge, FALSE);

View File

@ -680,7 +680,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
// Flush formatted images using a lazy flush
//
const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding
const F32 MAX_INACTIVE_TIME = 5.f; // actually delete
const F32 MAX_INACTIVE_TIME = 20.f; // actually delete
S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
S32 num_refs = imagep->getNumRefs();

View File

@ -684,7 +684,7 @@ void LLVOVolume::updateTextures()
{
updateTextureVirtualSize();
if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive())
/*if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive())
{ //delete vertex buffer to free up some VRAM
LLSpatialGroup* group = mDrawable->getSpatialGroup();
if (group)
@ -695,7 +695,7 @@ void LLVOVolume::updateTextures()
//it becomes visible
group->setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO);
}
}
}*/
}
}
@ -3967,16 +3967,13 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
LLDrawable* drawable = facep->getDrawable();
if (drawable->isActive())
if (drawable->isState(LLDrawable::ANIMATED_CHILD))
{
if (drawable->isState(LLDrawable::ANIMATED_CHILD))
{
model_mat = &drawable->getWorldMatrix();
}
else
{
model_mat = &drawable->getRenderMatrix();
}
model_mat = &drawable->getWorldMatrix();
}
else if (drawable->isActive())
{
model_mat = &drawable->getRenderMatrix();
}
else
{

View File

@ -1793,7 +1793,17 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED);
if (done)
{
drawablep->clearState(LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
drawablep->clearState(LLDrawable::ON_MOVE_LIST);
if (drawablep->isState(LLDrawable::ANIMATED_CHILD)) // && drawablep->getVObj()->getAngularVelocity().isExactlyZero())
{ //not a target omega object, will likely not receive any future world matrix updates
// -- this keeps attachments from getting stuck in space and falling off your avatar
drawablep->clearState(LLDrawable::ANIMATED_CHILD);
LLSpatialGroup* group = drawablep->getSpatialGroup();
if (group)
{
group->dirtyGeom();
}
}
iter = moved_list.erase(curiter);
}
}