aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r--linden/indra/newview/llviewermessage.cpp73
1 files changed, 63 insertions, 10 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 1b2ba22..d5d9324 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -1266,7 +1266,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1266 if (gCacheName->getName(info->mFromID, first_name, last_name)) 1266 if (gCacheName->getName(info->mFromID, first_name, last_name))
1267 { 1267 {
1268// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) 1268// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
1269 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) 1269 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) )
1270 { 1270 {
1271 first_name = gRlvHandler.getAnonym(first_name.append(" ").append(last_name)); 1271 first_name = gRlvHandler.getAnonym(first_name.append(" ").append(last_name));
1272 last_name.clear(); 1272 last_name.clear();
@@ -1287,12 +1287,15 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1287 { 1287 {
1288 // *TODO:translate -> [FIRST] [LAST] 1288 // *TODO:translate -> [FIRST] [LAST]
1289// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) 1289// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
1290 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) 1290 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) )
1291 { 1291 {
1292 args["[NAME]"] = gRlvHandler.getAnonym(info->mFromName); 1292 args["[NAME]"] = gRlvHandler.getAnonym(info->mFromName);
1293 } 1293 }
1294// [/RLVa:KB] 1294// [/RLVa:KB]
1295 //args["[NAME]"] = info->mFromName; 1295 else
1296 {
1297 args["[NAME]"] = info->mFromName;
1298 }
1296 LLNotifyBox::showXml("UserGiveItem", args, 1299 LLNotifyBox::showXml("UserGiveItem", args,
1297 &inventory_offer_callback, (void*)info); 1300 &inventory_offer_callback, (void*)info);
1298 } 1301 }
@@ -1921,15 +1924,51 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1921 break; 1924 break;
1922 1925
1923 case IM_FROM_TASK: 1926 case IM_FROM_TASK:
1924 if (is_busy && !is_owned_by_me)
1925 { 1927 {
1926 return; 1928 if (is_busy && !is_owned_by_me)
1929 {
1930 return;
1931 }
1932 chat.mText = name + separator_string + message.substr(message_offset);
1933 chat.mFromName = name;
1934
1935 // Build a link to open the object IM info window.
1936 std::string location = ll_safe_string((char*)binary_bucket,binary_bucket_size);
1937
1938 LLSD query_string;
1939 query_string["owner"] = from_id;
1940 query_string["slurl"] = location.c_str();
1941 query_string["name"] = name;
1942 if (from_group)
1943 {
1944 query_string["groupowned"] = "true";
1945 }
1946
1947 if (session_id.notNull())
1948 {
1949 chat.mFromID = session_id;
1950 }
1951 else
1952 {
1953 // This message originated on a region without the updated code for task id and slurl information.
1954 // We just need a unique ID for this object that isn't the owner ID.
1955 // If it is the owner ID it will overwrite the style that contains the link to that owner's profile.
1956 // This isn't ideal - it will make 1 style for all objects owned by the the same person/group.
1957 // This works because the only thing we can really do in this case is show the owner name and link to their profile.
1958 chat.mFromID = from_id ^ gAgent.getSessionID();
1959 }
1960
1961 std::ostringstream link;
1962 link << "secondlife:///app/objectim/" << session_id
1963 << LLURI::mapToQueryString(query_string);
1964
1965 chat.mURL = link.str();
1966
1967 // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
1968 // IMs from objcts don't open IM sessions.
1969 chat.mSourceType = CHAT_SOURCE_OBJECT;
1970 LLFloaterChat::addChat(chat, FALSE, FALSE);
1927 } 1971 }
1928 chat.mText = name + separator_string + message.substr(message_offset);
1929 // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
1930 // IMs from objcts don't open IM sessions.
1931 chat.mSourceType = CHAT_SOURCE_OBJECT;
1932 LLFloaterChat::addChat(chat, FALSE, FALSE);
1933 break; 1972 break;
1934 case IM_FROM_TASK_AS_ALERT: 1973 case IM_FROM_TASK_AS_ALERT:
1935 if (is_busy && !is_owned_by_me) 1974 if (is_busy && !is_owned_by_me)
@@ -3007,6 +3046,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3007 // appropriate. 3046 // appropriate.
3008 LLVector3 shift_vector = regionp->getPosRegionFromGlobal( 3047 LLVector3 shift_vector = regionp->getPosRegionFromGlobal(
3009 gAgent.getRegion()->getOriginGlobal()); 3048 gAgent.getRegion()->getOriginGlobal());
3049 // don't shift objects, if teleporting more than about 1000 sims, as
3050 // for long teleports shifting objects garbles the view at the target region
3051 if (shift_vector.lengthSquared() > 6.5e10f)
3052 shift_vector = LLVector3::zero;
3010 gAgent.setRegion(regionp); 3053 gAgent.setRegion(regionp);
3011 gObjectList.shiftObjects(shift_vector); 3054 gObjectList.shiftObjects(shift_vector);
3012 gAssetStorage->setUpstream(msg->getSender()); 3055 gAssetStorage->setUpstream(msg->getSender());
@@ -3112,6 +3155,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3112 3155
3113 // If the server version has changed, display an info box and offer 3156 // If the server version has changed, display an info box and offer
3114 // to display the release notes, unless this is the initial log in. 3157 // to display the release notes, unless this is the initial log in.
3158 // Also verify we're on an OpenSimulator here.
3115 if (gLastVersionChannel == version_channel) 3159 if (gLastVersionChannel == version_channel)
3116 { 3160 {
3117 return; 3161 return;
@@ -3123,6 +3167,15 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3123 "ServerVersionChanged", display_release_notes, NULL); 3167 "ServerVersionChanged", display_release_notes, NULL);
3124 } 3168 }
3125 3169
3170 if (version_channel.find("OpenSim") != std::string::npos)
3171 {
3172 gSavedSettings.setBOOL("LoggedIntoOpenSim", TRUE);
3173 }
3174 else
3175 {
3176 gSavedSettings.setBOOL("LoggedIntoOpenSim", FALSE);
3177 }
3178
3126 gLastVersionChannel = version_channel; 3179 gLastVersionChannel = version_channel;
3127} 3180}
3128 3181