diff options
author | Tofu Buzzard <no-email> | 2011-02-10 09:53:10 -0800 |
---|---|---|
committer | Tofu Buzzard <no-email> | 2011-02-10 09:53:10 -0800 |
commit | 3738cf241ab547e93c0cd9f0c0250502d93c9092 (patch) | |
tree | deae8e6225a3746e68676bc3f821ef38dad169fb /indra/newview/llviewerobjectlist.cpp | |
parent | c213618b53d3a18c12afe21d4327d7d86095feaa (diff) | |
parent | e3ed1565f8c6eeff5d87f862465038aa98576fa9 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 8c3bf5bf12..4f71f8ea87 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1490,6 +1490,22 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) LLWorld::getInstance()->shiftRegions(offset); } +//debug code +bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp) +{ + for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) + { + LLViewerObject* objectp = *iter; + + if(objectp->isDead() || objectp->getRegion() == regionp) + { + return true ; + } + } + + return false ; +} + void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1508,6 +1524,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) { LLViewerObject* objectp = *iter; + + llassert_always(!objectp->isDead()); + if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) { continue; @@ -1795,7 +1814,7 @@ LLViewerObject *LLViewerObjectList::replaceObject(const LLUUID &id, const LLPCod LLViewerObject *old_instance = findObject(id); if (old_instance) { - cleanupReferences(old_instance); + //cleanupReferences(old_instance); old_instance->markDead(); return createObject(pcode, regionp, id, old_instance->getLocalID(), LLHost()); |