summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-03-01 12:02:14 -0800
committerMerov Linden <merov@lindenlab.com>2011-03-01 12:02:14 -0800
commit2ef66a7cfa9f82cda7edc34225742d82a18be1ad (patch)
tree9ce182899654bbc85e5f08bcc52a54706356d095
parent760f6f494eac5443861bc2486bdea6c5268a44e4 (diff)
parente3f075f77560323e6fb812ca2058d07ccb506044 (diff)
STORM-954 : pull into viewer-development
-rw-r--r--doc/contributions.txt4
-rw-r--r--indra/newview/llworld.cpp36
2 files changed, 39 insertions, 1 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index d1a51033bf..26d9b98b95 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -394,15 +394,16 @@ Jonathan Yap
STORM-829
STORM-844
STORM-953
+ STORM-954
STORM-960
STORM-869
STORM-974
STORM-975
+ STORM-977
STORM-979
STORM-980
VWR-17801
VWR-24347
- STORM-977
Kage Pixel
VWR-11
Ken March
@@ -789,6 +790,7 @@ Twisted Laws
STORM-467
STORM-844
STORM-643
+ STORM-954
Vadim Bigbear
VWR-2681
Vector Hastings
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<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);
+ }
+ }
+ }
+ }
}