From e3f075f77560323e6fb812ca2058d07ccb506044 Mon Sep 17 00:00:00 2001 From: Twisted Laws Date: Tue, 15 Feb 2011 14:13:43 -0500 Subject: STORM-954 SL-viewer 2.0 No nearby people when over approxiamately 1000 meters --- indra/newview/llworld.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9db6d5e08c..481148ba4e 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1474,6 +1474,42 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* 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::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); + } + } + } + } } -- cgit v1.2.3 From 409cc0cf9328e08d99f08bd44fcd7ba3a5ee5a59 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 7 Mar 2011 18:10:28 -0700 Subject: fix for STORM-1046:[crashhunters] crash in LWorld::removeRegion STORM-1014: Viewer crash in LLSurface::getWaterHeight STORM-1047:[crashhunters] crash at LLViewerObjectList::renderObjectsForMap --- indra/newview/llworld.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 481148ba4e..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)) ; } -- cgit v1.2.3