diff --git a/doc/contributions.txt b/doc/contributions.txt
index e1fb234f0510e7d5acd9efa0364ed8a3041f6986..3d8cd1d6854d102e502bdbc326fcbe0418a31069 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -395,6 +395,7 @@ Jonathan Yap
 	VWR-17801
 	VWR-24347
 	STORM-975
+	STORM-954
 Kage Pixel
 	VWR-11
 Ken March
@@ -781,6 +782,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 9db6d5e08ce5b41cfd05b296fdd3f8401e600792..481148ba4e5f9ea7d07217f89bf5f3e020a464e1 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);
+				}
+			}
+		}
+	}
 }