aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llfloatermap.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp
index 31e57a0..3807a90 100644
--- a/linden/indra/newview/llfloatermap.cpp
+++ b/linden/indra/newview/llfloatermap.cpp
@@ -279,12 +279,25 @@ void LLFloaterMap::populateRadar()
279 // [/RLVa:KB] 279 // [/RLVa:KB]
280 280
281 // check if they're in certain ranges and notify user if we've enabled that 281 // check if they're in certain ranges and notify user if we've enabled that
282 LLVector3d temp = positions[i] - current_pos; 282 LLVector3d temp = positions[i];
283 F32 distance = llround((F32)temp.magVec(), 0.1f); 283 if (positions[i].mdV[VZ] == 0.0f) // LL only sends height value up to 1024m, try to work around it
284 /*char dist[32]; 284 {
285 sprintf(dist, "%.1f", distance); 285 LLViewerObject *av_obj = gObjectList.findObject(avatar_ids[i]);
286 std::string dist_string = dist;*/ 286 if (av_obj != NULL && av_obj->isAvatar())
287 std::string dist_string = llformat("%.1f", distance); 287 {
288 LLVOAvatar* avatarp = (LLVOAvatar*)av_obj;
289 if (avatarp != NULL)
290 {
291 temp = avatarp->getPositionGlobal();
292 }
293 }
294 }
295 F64 distance = dist_vec(temp, current_pos);
296 // we round for accuracy when avs tp in
297 std::string dist_string = llformat("%.1f", llround((F32)distance, 0.1f));
298
299 /*llinfos << "Avatar :" << fullname << " Position: " << positions[i] << " Your Position: "
300 << current_pos << " Distance: " << distance << llendl;*/
288 301
289 if (notify_chat) 302 if (notify_chat)
290 { 303 {