diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-02-10 10:44:21 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-02-10 10:44:21 -0500 |
commit | e3ed1565f8c6eeff5d87f862465038aa98576fa9 (patch) | |
tree | 4ab57c1658d589d802f1e6bb6ff3331b75b61074 /indra/newview/llviewerobjectlist.cpp | |
parent | 952c3eaaa8c78d00ef62932d46af1d8fa565e7b2 (diff) | |
parent | 76cb9a7796ffce930458aae00147f8dafa4b33fb (diff) |
Automated merge up from viewer-development into mesh-development
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()); |