Fire-13997. When an object is derendered it might get added again from cache. Kill that new copy too.

Nicky 2014-06-12 22:24:13 +02:00
parent f38113b455
commit f5ef59b819
2 changed files with 17 additions and 0 deletions

View File

@ -1443,6 +1443,8 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
if (objectp)
{
mDerendered.insert( objectp->getID() ); // <FS:ND> Remember this object it case it comes back.
objectp->markDead(); // does the right thing if object already dead
return TRUE;
}
@ -2168,6 +2170,11 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
updateActive(objectp);
// <FS:ND> We might have killed this object earlier, but it might get resurrected from fastcache. Kill it again to make sure it stays dead.
if( mDerendered.end() != mDerendered.find( uuid ) )
killObject( objectp );
// </FS:ND>
return objectp;
}
@ -2206,6 +2213,11 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
updateActive(objectp);
// <FS:ND> We might have killed this object earlier, but it might get resurrected from fastcache. Kill it again to make sure it stays dead.
if( mDerendered.end() != mDerendered.find( uuid ) )
killObject( objectp );
// </FS:ND>
return objectp;
}

View File

@ -234,6 +234,11 @@ protected:
std::set<LLViewerObject *> mSelectPickList;
friend class LLViewerObject;
// <FS:ND> Remember objects we did derender. We might get object updates for them that create new instances. In those cases we kill them again.
private:
std::set< LLUUID > mDerendered;
// </FS:ND>
};