diff options
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 173 |
1 files changed, 1 insertions, 172 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 593f593a0f..47a996d894 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1339,38 +1339,13 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) } // Don't clean up mObject references, these will be cleaned up more efficiently later! - // Also, not cleaned up - removeDrawable(objectp->mDrawable); - + if(new_dead_object) { mNumDeadObjects++; } } -void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE; - - if (!drawablep) - { - return; - } - - for (S32 i = 0; i < drawablep->getNumFaces(); i++) - { - LLFace* facep = drawablep->getFace(i) ; - if(facep) - { - LLViewerObject* objectp = facep->getViewerObject(); - if(objectp) - { - mSelectPickList.erase(objectp); - } - } - } -} - BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { // Don't ever kill gAgentAvatarp, just force it to the agent's region @@ -1836,152 +1811,6 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 ¢er) { } -void LLViewerObjectList::generatePickList(LLCamera &camera) -{ - llassert(false); -#if 0 //deprecated - LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; - - LLViewerObject *objectp; - S32 i; - // Reset all of the GL names to zero. - for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) - { - (*iter)->mGLName = 0; - } - - mSelectPickList.clear(); - - std::vector<LLDrawable*> pick_drawables; - - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) - { - LLViewerRegion* region = *iter; - for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) - { - LLSpatialPartition* part = region->getSpatialPartition(i); - if (part) - { - part->cull(camera, &pick_drawables, TRUE); - } - } - } - - for (std::vector<LLDrawable*>::iterator iter = pick_drawables.begin(); - iter != pick_drawables.end(); iter++) - { - LLDrawable* drawablep = *iter; - if( !drawablep ) - continue; - - LLViewerObject* last_objectp = NULL; - for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++) - { - LLFace * facep = drawablep->getFace(face_num); - if (!facep) continue; - - LLViewerObject* objectp = facep->getViewerObject(); - - if (objectp && objectp != last_objectp) - { - mSelectPickList.insert(objectp); - last_objectp = objectp; - } - } - } - - LLHUDNameTag::addPickable(mSelectPickList); - - for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - objectp = (LLVOAvatar*) *iter; - if (!objectp->isDead()) - { - if (objectp->mDrawable.notNull() && objectp->mDrawable->isVisible()) - { - mSelectPickList.insert(objectp); - } - } - } - - // add all hud objects to pick list - if (isAgentAvatarValid()) - { - for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); - iter != gAgentAvatarp->mAttachmentPoints.end(); ) - { - LLVOAvatar::attachment_map_t::iterator curiter = iter++; - LLViewerJointAttachment* attachment = curiter->second; - if (attachment->getIsHUDAttachment()) - { - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - if (LLViewerObject* attached_object = attachment_iter->get()) - { - mSelectPickList.insert(attached_object); - LLViewerObject::const_child_list_t& child_list = attached_object->getChildren(); - for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); - iter != child_list.end(); iter++) - { - LLViewerObject* childp = *iter; - if (childp) - { - mSelectPickList.insert(childp); - } - } - } - } - } - } - } - - S32 num_pickables = (S32)mSelectPickList.size() + LLHUDIcon::getNumInstances(); - - if (num_pickables != 0) - { - S32 step = (0x000fffff - GL_NAME_INDEX_OFFSET) / num_pickables; - - std::set<LLViewerObject*>::iterator pick_it; - i = 0; - for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end();) - { - LLViewerObject* objp = (*pick_it); - if (!objp || objp->isDead() || !objp->mbCanSelect) - { - mSelectPickList.erase(pick_it++); - continue; - } - - objp->mGLName = (i * step) + GL_NAME_INDEX_OFFSET; - i++; - ++pick_it; - } - - LLHUDIcon::generatePickIDs(i * step, step); - } -#endif -} - -LLViewerObject *LLViewerObjectList::getSelectedObject(const U32 object_id) -{ - llassert(false); -#if 0 - std::set<LLViewerObject*>::iterator pick_it; - for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end(); ++pick_it) - { - if ((*pick_it)->mGLName == object_id) - { - return (*pick_it); - } - } -#endif - return NULL; -} - void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent, const std::string &string, const LLColor4 &color, |