diff options
author | McCabe Maxsted | 2009-10-19 21:06:17 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-10-19 21:06:17 -0700 |
commit | 95b78d58fa6e1f18160fb42252d2f6b0e87ca372 (patch) | |
tree | 2db8c17b306947e2b6242ca79913da4a41c0bda0 /linden | |
parent | Clamp map teleporting at 4096 rather than 1000 (diff) | |
download | meta-impy-95b78d58fa6e1f18160fb42252d2f6b0e87ca372.zip meta-impy-95b78d58fa6e1f18160fb42252d2f6b0e87ca372.tar.gz meta-impy-95b78d58fa6e1f18160fb42252d2f6b0e87ca372.tar.bz2 meta-impy-95b78d58fa6e1f18160fb42252d2f6b0e87ca372.tar.xz |
Partial fix for avatar names not displaying at > 1024m (won't be fixed until LL actually sends height in more than one byte -_-)
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/llfloatermap.cpp | 25 |
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 | { |