diff options
author | Eli Linden <eli@lindenlab.com> | 2011-03-10 12:18:27 -0800 |
---|---|---|
committer | Eli Linden <eli@lindenlab.com> | 2011-03-10 12:18:27 -0800 |
commit | 70aff7fd157b1e2894a4d065caf9a63848d072b0 (patch) | |
tree | dee262d1b7ac3ef14eebeb71d55e9b0755209148 /indra/newview/llworld.cpp | |
parent | 64e672d9d92d1b8f92e968b0164b2212a71120da (diff) | |
parent | 378585e7f089b62b7a0dd69adde48cd63fc7bacc (diff) |
Merge
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r-- | indra/newview/llworld.cpp | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9db6d5e08c..8f7197c607 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -282,7 +282,9 @@ void LLWorld::removeRegion(const LLHost &host) updateWaterObjects(); - llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; + //double check all objects of this region are removed. + gObjectList.clearAllMapObjectsInRegion(regionp) ; + //llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; } @@ -1474,6 +1476,42 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi } } } + // retrieve the list of close avatars from viewer objects as well + // for when we are above 1000m, only do this when we are retrieving + // uuid's too as there could be duplicates + if(avatar_ids != NULL) + { + for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; + if(pVOAvatar->isDead() || pVOAvatar->isSelf()) + continue; + LLUUID uuid = pVOAvatar->getID(); + if(uuid.isNull()) + continue; + LLVector3d pos_global = pVOAvatar->getPositionGlobal(); + if(dist_vec(pos_global, relative_to) <= radius) + { + bool found = false; + uuid_vec_t::iterator sel_iter = avatar_ids->begin(); + for (; sel_iter != avatar_ids->end(); sel_iter++) + { + if(*sel_iter == uuid) + { + found = true; + break; + } + } + if(!found) + { + if(positions != NULL) + positions->push_back(pos_global); + avatar_ids->push_back(uuid); + } + } + } + } } |