diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-05-06 15:25:12 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-05-06 15:25:12 -0400 |
commit | 39ad3f1d880a26dcf8189cad2501002c189a7ac2 (patch) | |
tree | a843d0c5843ca5e6a5fcbdfc6929bc2b21b960d6 /indra/newview/llviewermessage.cpp | |
parent | 5c7a906b44aa950ec3c8b786fec6516b51f9d66c (diff) | |
parent | def9f9290e661e6a35b7b255eb71b6e2767fdea0 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9641a0901c..3f018fc57c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -122,6 +122,7 @@ // const F32 BIRD_AUDIBLE_RADIUS = 32.0f; const F32 SIT_DISTANCE_FROM_TARGET = 0.25f; +const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f; static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting. // Determine how quickly residents' scripts can issue question dialogs @@ -4745,7 +4746,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) BOOL force_mouselook; mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook); - if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > 0.0001f) + if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > CAMERA_POSITION_THRESHOLD_SQUARED) { gAgentCamera.setSitCamera(sitObjectID, camera_eye, camera_at); } @@ -5523,7 +5524,11 @@ void process_alert_core(const std::string& message, BOOL modal) { LLSD args; std::string new_msg =LLNotifications::instance().getGlobalString(message); - args["MESSAGE"] = new_msg; + + std::string localized_msg; + bool is_message_localized = LLTrans::findString(localized_msg, new_msg); + + args["MESSAGE"] = is_message_localized ? localized_msg : new_msg; LLNotificationsUtil::add("SystemMessageTip", args); } } @@ -6461,9 +6466,12 @@ void process_script_dialog(LLMessageSystem* msg, void**) LLSD payload; LLUUID object_id; + LLUUID owner_id; + msg->getUUID("Data", "ObjectID", object_id); + msg->getUUID("OwnerData", "OwnerID", owner_id); - if (LLMuteList::getInstance()->isMuted(object_id)) + if (LLMuteList::getInstance()->isMuted(object_id) || LLMuteList::getInstance()->isMuted(owner_id)) { return; } |