diff options
-rw-r--r-- | ChangeLog.txt | 9 | ||||
-rw-r--r-- | linden/indra/newview/llfloatermap.cpp | 47 |
2 files changed, 33 insertions, 23 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 9a63b6b..ef576cc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,5 +1,12 @@ | |||
1 | 2009-10-07 McCabe Maxsted <hakushakukun@gmail.com> | 1 | 2009-10-08 McCabe Maxsted <hakushakukun@gmail.com> |
2 | 2 | ||
3 | * Fixed entering sim notification being tied to radar range. | ||
4 | |||
5 | modified: linden/indra/newview/llfloatermap.cpp | ||
6 | |||
7 | |||
8 | 2009-10-07 McCabe Maxsted <hakushakukun@gmail.com> | ||
9 | |||
3 | * Clickable IMs in chat history was causing readability problems at varying distances, | 10 | * Clickable IMs in chat history was causing readability problems at varying distances, |
4 | decided it was a bug and fixed it. | 11 | decided it was a bug and fixed it. |
5 | 12 | ||
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 142d8fe..0ee0f2b 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp | |||
@@ -237,16 +237,16 @@ void LLFloaterMap::populateRadar() | |||
237 | 237 | ||
238 | S32 scroll_pos = mRadarList->getScrollPos(); | 238 | S32 scroll_pos = mRadarList->getScrollPos(); |
239 | 239 | ||
240 | LLVector3d current_pos = gAgent.getPositionGlobal(); | ||
241 | |||
242 | // clear count | 240 | // clear count |
243 | std::stringstream avatar_count; | 241 | std::stringstream avatar_count; |
244 | avatar_count.str(""); | 242 | avatar_count.str(""); |
245 | 243 | ||
246 | // find what avatars you can see | 244 | // find what avatars you can see |
245 | F32 range = gSavedSettings.getF32("NearMeRange"); | ||
246 | LLVector3d current_pos = gAgent.getPositionGlobal(); | ||
247 | std::vector<LLUUID> avatar_ids; | 247 | std::vector<LLUUID> avatar_ids; |
248 | std::vector<LLVector3d> positions; | 248 | std::vector<LLVector3d> positions; |
249 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, current_pos, gSavedSettings.getF32("NearMeRange")); | 249 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); |
250 | 250 | ||
251 | LLSD element; | 251 | LLSD element; |
252 | 252 | ||
@@ -277,12 +277,13 @@ void LLFloaterMap::populateRadar() | |||
277 | } | 277 | } |
278 | // [/RLVa:KB] | 278 | // [/RLVa:KB] |
279 | 279 | ||
280 | // check if they're in chat range and notify user | 280 | // check if they're in certain ranges and notify user if we've enabled that |
281 | LLVector3d temp = positions[i] - current_pos; | 281 | LLVector3d temp = positions[i] - current_pos; |
282 | F32 distance = llround((F32)temp.magVec(), 0.1f); | 282 | F32 distance = llround((F32)temp.magVec(), 0.1f); |
283 | char dist[32]; | 283 | /*char dist[32]; |
284 | sprintf(dist, "%.1f", distance); | 284 | sprintf(dist, "%.1f", distance); |
285 | std::string dist_string = dist; | 285 | std::string dist_string = dist;*/ |
286 | std::string dist_string = llformat("%.1f", distance); | ||
286 | 287 | ||
287 | if (notify_chat) | 288 | if (notify_chat) |
288 | { | 289 | { |
@@ -300,7 +301,6 @@ void LLFloaterMap::populateRadar() | |||
300 | removeFromChatList(avatar_ids[i]); | 301 | removeFromChatList(avatar_ids[i]); |
301 | } | 302 | } |
302 | } | 303 | } |
303 | |||
304 | updateChatList(avatar_ids); | 304 | updateChatList(avatar_ids); |
305 | } | 305 | } |
306 | else if (!mChatAvatars.empty()) | 306 | else if (!mChatAvatars.empty()) |
@@ -308,7 +308,6 @@ void LLFloaterMap::populateRadar() | |||
308 | mChatAvatars.clear(); | 308 | mChatAvatars.clear(); |
309 | } | 309 | } |
310 | 310 | ||
311 | // announce their presence in the sim if we've enabled that | ||
312 | if (notify_sim) | 311 | if (notify_sim) |
313 | { | 312 | { |
314 | if (!getInChatList(avatar_ids[i]) && !getInSimAvList(avatar_ids[i])) | 313 | if (!getInChatList(avatar_ids[i]) && !getInSimAvList(avatar_ids[i])) |
@@ -333,23 +332,27 @@ void LLFloaterMap::populateRadar() | |||
333 | mSimAvatars.clear(); | 332 | mSimAvatars.clear(); |
334 | } | 333 | } |
335 | 334 | ||
336 | // append typing string | 335 | // only display avatars in range |
337 | std::string typing = ""; | 336 | if (distance <= range) |
338 | if (getIsTyping(avatar_ids[i])) | ||
339 | { | 337 | { |
340 | typing = getString("is_typing")+ " "; | 338 | // append typing string |
341 | } | 339 | std::string typing = ""; |
340 | if (getIsTyping(avatar_ids[i])) | ||
341 | { | ||
342 | typing = getString("is_typing")+ " "; | ||
343 | } | ||
342 | 344 | ||
343 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("is_muted") : ""; | 345 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("is_muted") : ""; |
344 | element["id"] = avatar_ids[i]; | 346 | element["id"] = avatar_ids[i]; |
345 | element["columns"][0]["column"] = "avatar_name"; | 347 | element["columns"][0]["column"] = "avatar_name"; |
346 | element["columns"][0]["type"] = "text"; | 348 | element["columns"][0]["type"] = "text"; |
347 | element["columns"][0]["value"] = typing + fullname + " " + mute_text; | 349 | element["columns"][0]["value"] = typing + fullname + " " + mute_text; |
348 | element["columns"][1]["column"] = "avatar_distance"; | 350 | element["columns"][1]["column"] = "avatar_distance"; |
349 | element["columns"][1]["type"] = "text"; | 351 | element["columns"][1]["type"] = "text"; |
350 | element["columns"][1]["value"] = dist_string+"m"; | 352 | element["columns"][1]["value"] = dist_string+"m"; |
351 | 353 | ||
352 | mRadarList->addElement(element, ADD_BOTTOM); | 354 | mRadarList->addElement(element, ADD_BOTTOM); |
355 | } | ||
353 | } | 356 | } |
354 | } | 357 | } |
355 | 358 | ||