diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 6c95d45b51..621e7655f9 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1231,35 +1231,35 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positi { positions->clear(); } - // get the list of avatars from the character list first, so distances are correct - // when agent is above 1020m and other avatars are nearby - for (std::vector::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - // Watch out for a potential merge of STORM-1793! - // avatar_ids and positions MUST be checked - // INDEPENDENTLY!!! Things rely on being able to - // pass either one as NULL!!! - LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; - if(!pVOAvatar->isDead() && !pVOAvatar->isSelf()) - { - LLUUID uuid = pVOAvatar->getID(); - if(!uuid.isNull()) - { - LLVector3d pos_global = pVOAvatar->getPositionGlobal(); - if(dist_vec_squared(pos_global, relative_to) <= radius_squared) - { - if(positions != NULL) - { - positions->push_back(pos_global); - } - if(avatar_ids !=NULL) - { - avatar_ids->push_back(uuid); - } - } - } - } + // get the list of avatars from the character list first, so distances are correct + // when agent is above 1020m and other avatars are nearby + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + // Watch out for a potential merge of STORM-1793! + // avatar_ids and positions MUST be checked + // INDEPENDENTLY!!! Things rely on being able to + // pass either one as NULL!!! + LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; + if(!pVOAvatar->isDead() && !pVOAvatar->isSelf()) + { + LLUUID uuid = pVOAvatar->getID(); + if(!uuid.isNull()) + { + LLVector3d pos_global = pVOAvatar->getPositionGlobal(); + if(dist_vec_squared(pos_global, relative_to) <= radius_squared) + { + if(positions != NULL) + { + positions->push_back(pos_global); + } + if(avatar_ids !=NULL) + { + avatar_ids->push_back(uuid); + } + } + } + } } // region avatars added for situations where radius is greater than RenderFarClip for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();