diff options
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llagent.cpp | 82 | ||||
-rw-r--r-- | linden/indra/newview/llagent.h | 25 | ||||
-rw-r--r-- | linden/indra/newview/llworldmap.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/strings.xml | 6 |
4 files changed, 64 insertions, 53 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 0a0374c..758cae2 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -109,6 +109,7 @@ | |||
109 | #include "lltoolmgr.h" | 109 | #include "lltoolmgr.h" |
110 | #include "lltoolpie.h" | 110 | #include "lltoolpie.h" |
111 | #include "lltoolview.h" | 111 | #include "lltoolview.h" |
112 | #include "lltrans.h" | ||
112 | #include "llui.h" // for make_ui_sound | 113 | #include "llui.h" // for make_ui_sound |
113 | #include "llurldispatcher.h" | 114 | #include "llurldispatcher.h" |
114 | #include "llviewercamera.h" | 115 | #include "llviewercamera.h" |
@@ -226,16 +227,6 @@ LLAgent gAgent; | |||
226 | // | 227 | // |
227 | BOOL LLAgent::sPhantom = FALSE; | 228 | BOOL LLAgent::sPhantom = FALSE; |
228 | 229 | ||
229 | BOOL LLAgent::lure_show = FALSE; | ||
230 | std::string LLAgent::lure_name; | ||
231 | LLVector3d LLAgent::lure_posglobal; | ||
232 | U16 LLAgent::lure_global_x; | ||
233 | U16 LLAgent::lure_global_y; | ||
234 | int LLAgent::lure_x; | ||
235 | int LLAgent::lure_y; | ||
236 | int LLAgent::lure_z; | ||
237 | std::string LLAgent::lure_maturity; | ||
238 | |||
239 | const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; | 230 | const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; |
240 | 231 | ||
241 | std::map<std::string, std::string> LLAgent::sTeleportErrorMessages; | 232 | std::map<std::string, std::string> LLAgent::sTeleportErrorMessages; |
@@ -415,7 +406,17 @@ LLAgent::LLAgent() : | |||
415 | mWearablesLoaded(FALSE), | 406 | mWearablesLoaded(FALSE), |
416 | mTextureCacheQueryID(0), | 407 | mTextureCacheQueryID(0), |
417 | mAppearanceSerialNum(0), | 408 | mAppearanceSerialNum(0), |
418 | mbTeleportKeepsLookAt(false) | 409 | mbTeleportKeepsLookAt(false), |
410 | |||
411 | mLureShow(FALSE), | ||
412 | mLureName(""), | ||
413 | mLurePosGlobal(), | ||
414 | mLureGlobalX(0), | ||
415 | mLureGlobalY(0), | ||
416 | mLureX(0), | ||
417 | mLureY(0), | ||
418 | mLureZ(0), | ||
419 | mLureMaturityString("") | ||
419 | { | 420 | { |
420 | U32 i; | 421 | U32 i; |
421 | for (i = 0; i < TOTAL_CONTROLS; i++) | 422 | for (i = 0; i < TOTAL_CONTROLS; i++) |
@@ -8090,7 +8091,7 @@ LLVector3 LLAgent::getLastCoords() | |||
8090 | return mLastCoordinates; | 8091 | return mLastCoordinates; |
8091 | } | 8092 | } |
8092 | 8093 | ||
8093 | void LLAgent::showLureDestination(const std::string fromname, const int global_x, const int global_y, const int x, const int y, const int z, const std::string maturity) | 8094 | void LLAgent::showLureDestination(const std::string fromname, const S32 global_x, const S32 global_y, const S32 x, const S32 y, const S32 z, const std::string maturity) |
8094 | { | 8095 | { |
8095 | const LLVector3d posglobal = LLVector3d(F64(global_x), F64(global_y), F64(0)); | 8096 | const LLVector3d posglobal = LLVector3d(F64(global_x), F64(global_y), F64(0)); |
8096 | LLSimInfo* siminfo; | 8097 | LLSimInfo* siminfo; |
@@ -8098,49 +8099,54 @@ void LLAgent::showLureDestination(const std::string fromname, const int global_x | |||
8098 | std::string sim_name; | 8099 | std::string sim_name; |
8099 | LLWorldMap::getInstance()->simNameFromPosGlobal( posglobal, sim_name ); | 8100 | LLWorldMap::getInstance()->simNameFromPosGlobal( posglobal, sim_name ); |
8100 | 8101 | ||
8101 | if(siminfo) | 8102 | if (siminfo) |
8102 | { | 8103 | { |
8103 | |||
8104 | llinfos << fromname << "'s teleport lure is to " << sim_name.c_str() << " (" << maturity << ")" << llendl; | 8104 | llinfos << fromname << "'s teleport lure is to " << sim_name.c_str() << " (" << maturity << ")" << llendl; |
8105 | std::string url = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(x), S32(y), S32(z)); | 8105 | LLStringUtil::format_map_t args; |
8106 | std::string msg; | 8106 | args["[NAME]"] = fromname; |
8107 | msg = llformat("%s's teleport lure is to %s", fromname.c_str(), url.c_str()); | 8107 | args["[DESTINATION]"] = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(x), S32(y), S32(z)); |
8108 | if(maturity != "") | 8108 | std::string msg = LLTrans::getString("TeleportLureMaturity", args); |
8109 | if (maturity != "") | ||
8110 | { | ||
8109 | msg.append(llformat(" (%s)", maturity.c_str())); | 8111 | msg.append(llformat(" (%s)", maturity.c_str())); |
8112 | } | ||
8110 | LLChat chat(msg); | 8113 | LLChat chat(msg); |
8111 | LLFloaterChat::addChat(chat); | 8114 | LLFloaterChat::addChat(chat); |
8112 | } | 8115 | } |
8113 | else | 8116 | else |
8114 | { | 8117 | { |
8115 | LLAgent::lure_show = TRUE; | 8118 | mLureShow = TRUE; |
8116 | LLAgent::lure_name = fromname; | 8119 | mLureName = fromname; |
8117 | LLAgent::lure_posglobal = posglobal; | 8120 | mLurePosGlobal = posglobal; |
8118 | LLAgent::lure_global_x = U16(global_x / 256); | 8121 | mLureGlobalX = U16(global_x / 256); |
8119 | LLAgent::lure_global_y = U16(global_y / 256); | 8122 | mLureGlobalY = U16(global_y / 256); |
8120 | LLAgent::lure_x = x; | 8123 | mLureX = x; |
8121 | LLAgent::lure_y = y; | 8124 | mLureY = y; |
8122 | LLAgent::lure_z = z; | 8125 | mLureZ = z; |
8123 | LLAgent::lure_maturity = maturity; | 8126 | mLureMaturityString = maturity; |
8124 | LLWorldMap::getInstance()->sendMapBlockRequest(lure_global_x, lure_global_y, lure_global_x, lure_global_y, true); | 8127 | LLWorldMap::getInstance()->sendMapBlockRequest(mLureGlobalX, mLureGlobalY, mLureGlobalX, mLureGlobalY, true); |
8125 | } | 8128 | } |
8126 | } | 8129 | } |
8127 | 8130 | ||
8128 | void LLAgent::onFoundLureDestination() | 8131 | void LLAgent::onFoundLureDestination() |
8129 | { | 8132 | { |
8130 | LLAgent::lure_show = FALSE; | 8133 | mLureShow = FALSE; |
8131 | LLSimInfo* siminfo; | 8134 | LLSimInfo* siminfo; |
8132 | siminfo = LLWorldMap::getInstance()->simInfoFromPosGlobal(LLAgent::lure_posglobal); | 8135 | siminfo = LLWorldMap::getInstance()->simInfoFromPosGlobal(mLurePosGlobal); |
8133 | std::string sim_name; | 8136 | std::string sim_name; |
8134 | LLWorldMap::getInstance()->simNameFromPosGlobal( LLAgent::lure_posglobal, sim_name ); | 8137 | LLWorldMap::getInstance()->simNameFromPosGlobal( mLurePosGlobal, sim_name ); |
8135 | 8138 | ||
8136 | if(siminfo && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) | 8139 | if (siminfo && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) |
8137 | { | 8140 | { |
8138 | llinfos << LLAgent::lure_name << " is offering a TP to " << sim_name.c_str() << " (" << LLAgent::lure_maturity << ")" << llendl; | 8141 | llinfos << mLureName << " is offering a TP to " << sim_name.c_str() << " (" << mLureMaturityString << ")" << llendl; |
8139 | std::string url = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(LLAgent::lure_x), S32(LLAgent::lure_y), S32(LLAgent::lure_z)); | 8142 | LLStringUtil::format_map_t args; |
8140 | std::string msg; | 8143 | args["[NAME]"] = mLureName; |
8141 | msg = llformat("%s is offering a TP to %s", LLAgent::lure_name.c_str(), url.c_str()); | 8144 | args["[DESTINATION]"] = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(mLureX), S32(mLureY), S32(mLureZ)); |
8142 | if(LLAgent::lure_maturity != "") | 8145 | std::string msg = LLTrans::getString("TeleportOfferMaturity", args); |
8143 | msg.append(llformat(" (%s)", LLAgent::lure_maturity.c_str())); | 8146 | if (mLureMaturityString != "") |
8147 | { | ||
8148 | msg.append(llformat(" (%s)", mLureMaturityString.c_str())); | ||
8149 | } | ||
8144 | LLChat chat(msg); | 8150 | LLChat chat(msg); |
8145 | LLFloaterChat::addChat(chat); | 8151 | LLFloaterChat::addChat(chat); |
8146 | } | 8152 | } |
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index 03b0045..6bc4dac 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -767,17 +767,6 @@ public: | |||
767 | 767 | ||
768 | BOOL mInitialized; | 768 | BOOL mInitialized; |
769 | 769 | ||
770 | static BOOL lure_show; | ||
771 | static std::string lure_name; | ||
772 | static LLVector3d lure_posglobal; | ||
773 | static U16 lure_global_x; | ||
774 | static U16 lure_global_y; | ||
775 | static int lure_x; | ||
776 | static int lure_y; | ||
777 | static int lure_z; | ||
778 | static std::string lure_maturity; | ||
779 | |||
780 | |||
781 | S32 mNumPendingQueries; | 770 | S32 mNumPendingQueries; |
782 | S32* mActiveCacheQueries; | 771 | S32* mActiveCacheQueries; |
783 | 772 | ||
@@ -793,8 +782,18 @@ public: | |||
793 | LLFrameTimer mDoubleTapRunTimer; | 782 | LLFrameTimer mDoubleTapRunTimer; |
794 | EDoubleTapRunMode mDoubleTapRunMode; | 783 | EDoubleTapRunMode mDoubleTapRunMode; |
795 | 784 | ||
796 | static void showLureDestination(const std::string fromname, const int global_x, const int global_y, const int x, const int y, const int z, const std::string maturity); | 785 | BOOL mLureShow; |
797 | static void onFoundLureDestination(); | 786 | std::string mLureName; |
787 | LLVector3d mLurePosGlobal; | ||
788 | U16 mLureGlobalX; | ||
789 | U16 mLureGlobalY; | ||
790 | S32 mLureX; | ||
791 | S32 mLureY; | ||
792 | S32 mLureZ; | ||
793 | std::string mLureMaturityString; | ||
794 | |||
795 | void showLureDestination(const std::string fromname, const S32 global_x, const S32 global_y, const S32 x, const S32 y, const S32 z, const std::string maturity); | ||
796 | void onFoundLureDestination(); | ||
798 | 797 | ||
799 | private: | 798 | private: |
800 | bool mbTeleportKeepsLookAt; | 799 | bool mbTeleportKeepsLookAt; |
diff --git a/linden/indra/newview/llworldmap.cpp b/linden/indra/newview/llworldmap.cpp index 01a66d4..43d7426 100644 --- a/linden/indra/newview/llworldmap.cpp +++ b/linden/indra/newview/llworldmap.cpp | |||
@@ -735,9 +735,9 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**) | |||
735 | callback(handle, LLWorldMap::getInstance()->mSLURL, image_id, LLWorldMap::getInstance()->mSLURLTeleport); | 735 | callback(handle, LLWorldMap::getInstance()->mSLURL, image_id, LLWorldMap::getInstance()->mSLURLTeleport); |
736 | } | 736 | } |
737 | } | 737 | } |
738 | if(LLAgent::lure_show) | 738 | if(gAgent.mLureShow) |
739 | { | 739 | { |
740 | if((x_regions == LLAgent::lure_global_x) && (y_regions == LLAgent::lure_global_y)) | 740 | if((x_regions == gAgent.mLureGlobalX) && (y_regions == gAgent.mLureGlobalY)) |
741 | { | 741 | { |
742 | gAgent.onFoundLureDestination(); | 742 | gAgent.onFoundLureDestination(); |
743 | } | 743 | } |
diff --git a/linden/indra/newview/skins/default/xui/en-us/strings.xml b/linden/indra/newview/skins/default/xui/en-us/strings.xml index ceb6994..d3c9df1 100644 --- a/linden/indra/newview/skins/default/xui/en-us/strings.xml +++ b/linden/indra/newview/skins/default/xui/en-us/strings.xml | |||
@@ -23,6 +23,12 @@ | |||
23 | <string name="copy_obj_key_info"> | 23 | <string name="copy_obj_key_info"> |
24 | Copied key(s) for: | 24 | Copied key(s) for: |
25 | </string> | 25 | </string> |
26 | <string name="TeleportOfferMaturity"> | ||
27 | [NAME] is offering a TP to [DESTINATION] | ||
28 | </string> | ||
29 | <string name="TeleportLureMaturity"> | ||
30 | [NAME]'s teleport lure is to [DESTINATION] | ||
31 | </string> | ||
26 | 32 | ||
27 | <!-- Login --> | 33 | <!-- Login --> |
28 | <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string> | 34 | <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string> |