Fix up some assertions in lloctree.h
parent
c69855f233
commit
bc0abc7734
|
|
@ -945,6 +945,12 @@ void LLDrawable::updateUVMinMax()
|
|||
|
||||
void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
|
||||
{
|
||||
//precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this
|
||||
llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this));
|
||||
|
||||
//precondition: groupp MUST be null or groupp MUST contain this
|
||||
llassert(!groupp || groupp->hasElement(this));
|
||||
|
||||
/*if (mSpatialGroupp && (groupp != mSpatialGroupp))
|
||||
{
|
||||
mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY);
|
||||
|
|
@ -1468,6 +1474,10 @@ void LLSpatialBridge::cleanupReferences()
|
|||
LLDrawable::cleanupReferences();
|
||||
if (mDrawable)
|
||||
{
|
||||
/*
|
||||
|
||||
DON'T DO THIS -- this should happen through octree destruction
|
||||
|
||||
mDrawable->setSpatialGroup(NULL);
|
||||
if (mDrawable->getVObj())
|
||||
{
|
||||
|
|
@ -1482,7 +1492,7 @@ void LLSpatialBridge::cleanupReferences()
|
|||
drawable->setSpatialGroup(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
LLDrawable* drawablep = mDrawable;
|
||||
mDrawable = NULL;
|
||||
|
|
|
|||
|
|
@ -1841,13 +1841,13 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
|
|||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
drawablep->setSpatialGroup(NULL);
|
||||
|
||||
if (!curp->removeObject(drawablep))
|
||||
{
|
||||
OCT_ERRS << "Failed to remove drawable from octree!" << llendl;
|
||||
}
|
||||
|
||||
drawablep->setSpatialGroup(NULL);
|
||||
|
||||
assert_octree_valid(mOctree);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -346,6 +346,8 @@ public:
|
|||
void dirtyGeom() { setState(GEOM_DIRTY); }
|
||||
void dirtyMesh() { setState(MESH_DIRTY); }
|
||||
element_list& getData() { return mOctreeNode->getData(); }
|
||||
bool hasElement(LLDrawable* drawablep) { return mOctreeNode->getData().find(drawablep) != mOctreeNode->getData().end(); }
|
||||
|
||||
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
|
||||
|
||||
void drawObjectBox(LLColor4 col);
|
||||
|
|
|
|||
Loading…
Reference in New Issue