summaryrefslogtreecommitdiff
path: root/indra/newview/llworld.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-05 07:23:43 -0400
committerOz Linden <oz@lindenlab.com>2011-04-05 07:23:43 -0400
commitb5c834c6fdcee7d7238bebfc561ecee3ecca3589 (patch)
tree327ccb1a74e828db62e8d19768ff953192d86f72 /indra/newview/llworld.cpp
parentfa4359e571fb67aca651efc3403274cdf0bb2616 (diff)
parent2787be7d3558c3ca1ed15863e875612b1b27ec78 (diff)
merge changes for STORM-1051
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r--indra/newview/llworld.cpp40
1 files changed, 39 insertions, 1 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index d9ec41e73a..c6f9b6f6e4 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -277,7 +277,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)) ;
}
@@ -1466,6 +1468,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);
+ }
+ }
+ }
+ }
}