summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2012-02-03 09:02:01 -0500
committerJonathan Yap <none@none>2012-02-03 09:02:01 -0500
commitf106ef838397f62261e7ec4e94f96848f37acf19 (patch)
tree4f7a53ddac8a42e13c1dd6e27e2da372edbd5908
parent3b2511661e98eb5c0dbaf30ab72783b53341e03f (diff)
STORM-1793 Fix bad assumption in getAvatars
-rw-r--r--indra/newview/llworld.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 86780d0604..bbe440e14f 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1193,12 +1193,17 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
if( !pVOAvatar->isDead() &&
!pVOAvatar->isSelf() &&
!uuid.isNull() &&
- dist_vec_squared(pos_global, relative_to) <= radius_squared &&
- positions != NULL &&
- avatar_ids != NULL)
- {
- positions->push_back(pos_global);
- avatar_ids->push_back(uuid);
+ 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