aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-04 16:15:52 -0700
committerMcCabe Maxsted2009-10-04 16:16:38 -0700
commitf41ffc75aaebbbd122b36443ffb4813948d682aa (patch)
tree41c7ec252105648d7cfac01f11a0976d96d9603b /linden/indra
parentClear list of avs in chat range when setting disabled (diff)
downloadmeta-impy-f41ffc75aaebbbd122b36443ffb4813948d682aa.zip
meta-impy-f41ffc75aaebbbd122b36443ffb4813948d682aa.tar.gz
meta-impy-f41ffc75aaebbbd122b36443ffb4813948d682aa.tar.bz2
meta-impy-f41ffc75aaebbbd122b36443ffb4813948d682aa.tar.xz
Fixed mini-map distance label and rounding
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatermap.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp
index 4e3ffa3..200c60d 100644
--- a/linden/indra/newview/llfloatermap.cpp
+++ b/linden/indra/newview/llfloatermap.cpp
@@ -269,17 +269,17 @@ void LLFloaterMap::populateRadar()
269 // check if they're in chat range and notify user 269 // check if they're in chat range and notify user
270 LLVector3d temp = positions[i] - current_pos; 270 LLVector3d temp = positions[i] - current_pos;
271 F32 distance = llround((F32)temp.magVec(), 0.1f); 271 F32 distance = llround((F32)temp.magVec(), 0.1f);
272 std::stringstream dist; 272 char dist[32];
273 dist.str(""); 273 sprintf(dist, "%.1f", distance);
274 dist << distance; 274 std::string dist_string = dist;
275 275
276 if (gSavedSettings.getBOOL("MiniMapNotify")) 276 if (gSavedSettings.getBOOL("MiniMapNotify"))
277 { 277 {
278 if (distance <= 20.0f) 278 if (distance < 20.0f)
279 { 279 {
280 if (!getInChatList(avatar_ids[i])) 280 if (!getInChatList(avatar_ids[i]))
281 { 281 {
282 addToChatList(avatar_ids[i], dist.str()); 282 addToChatList(avatar_ids[i], dist_string);
283 } 283 }
284 } 284 }
285 else 285 else
@@ -304,7 +304,7 @@ void LLFloaterMap::populateRadar()
304 element["columns"][0]["value"] = fullname + " " + mute_text; 304 element["columns"][0]["value"] = fullname + " " + mute_text;
305 element["columns"][1]["column"] = "avatar_distance"; 305 element["columns"][1]["column"] = "avatar_distance";
306 element["columns"][1]["type"] = "text"; 306 element["columns"][1]["type"] = "text";
307 element["columns"][1]["value"] = dist.str()+"m"; 307 element["columns"][1]["value"] = dist_string+"m";
308 308
309 mRadarList->addElement(element, ADD_BOTTOM); 309 mRadarList->addElement(element, ADD_BOTTOM);
310 } 310 }