diff options
author | Rider Linden <rider@lindenlab.com> | 2024-10-14 12:49:43 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2024-10-14 14:51:56 -0700 |
commit | 2cd1f22f5b51708aaaf5d16a25847ef2c2832312 (patch) | |
tree | d40ccf40db721adf97780b33bab14b824c6cf4b4 /indra/newview/llviewermessage.cpp | |
parent | 35b3842b08208b9f0a440498b21a8ff8688d8a48 (diff) |
Private Issue #297: Accept new flags in ScriptTeleportRequest message. Flags indicate if the world map should be opened and focused.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c4ea8db3cd..d307f20b1f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6643,7 +6643,6 @@ void process_initiate_download(LLMessageSystem* msg, void**) (void**)new std::string(viewer_filename)); } - void process_script_teleport_request(LLMessageSystem* msg, void**) { if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return; @@ -6657,6 +6656,11 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) msg->getString("Data", "SimName", sim_name); msg->getVector3("Data", "SimPosition", pos); msg->getVector3("Data", "LookAt", look_at); + U32 flags = (BEACON_SHOW_MAP | BEACON_FOCUS_MAP); + if (msg->has("Options")) + { + msg->getU32("Options", "Flags", flags); + } LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance(); if(instance) @@ -6667,7 +6671,17 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) << LL_ENDL; instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); - LLFloaterReg::showInstance("world_map", "center"); + if (flags & BEACON_SHOW_MAP) + { + bool old_auto_focus = instance->getAutoFocus(); + instance->setAutoFocus(false); + instance->openFloater("center"); + if (flags & BEACON_FOCUS_MAP) + { + instance->setFocus(true); + } + instance->setAutoFocus(old_auto_focus); + } } // remove above two lines and replace with below line |