diff --git a/indra/newview/lfsimfeaturehandler.cpp b/indra/newview/lfsimfeaturehandler.cpp index 735aaca03f..a8eb3d5b60 100644 --- a/indra/newview/lfsimfeaturehandler.cpp +++ b/indra/newview/lfsimfeaturehandler.cpp @@ -104,6 +104,20 @@ void LFSimFeatureHandler::setSupportedFeatures() mShoutRange = extras.has("shout-range") ? extras["shout-range"].asInteger() : 100; mWhisperRange = extras.has("whisper-range") ? extras["whisper-range"].asInteger() : 10; + if(extras.has("GridURL")) + { + mGridURL = extras["GridURL"].asString(); + auto pos = mGridURL.find("://"); + if( pos != std::string::npos) + { + mGridURL = mGridURL.substr(pos+3,mGridURL.size()-(pos+3)); + } + } + else + { + mGridURL = LLGridManager::instance().getGridId(); + } + if (extras.has("SimulatorFPS") && extras.has("SimulatorFPSFactor") && extras.has("SimulatorFPSWarnPercent") && extras.has("SimulatorFPSCritPercent")) { diff --git a/indra/newview/lfsimfeaturehandler.h b/indra/newview/lfsimfeaturehandler.h index 06096ab9d6..9a348857e2 100644 --- a/indra/newview/lfsimfeaturehandler.h +++ b/indra/newview/lfsimfeaturehandler.h @@ -88,6 +88,7 @@ public: // Accessors bool simSupportsExport() const { return mSupportsExport; } std::string mapServerURL() const { return mMapServerURL; } + std::string gridURL() const { return mGridURL; } std::string searchURL() const { return mSearchURL; } U32 sayRange() const { return mSayRange; } U32 shoutRange() const { return mShoutRange; } @@ -113,6 +114,7 @@ private: // SignaledTypes SignaledType mSupportsExport; std::string mMapServerURL; + std::string mGridURL; SignaledType mSearchURL; SignaledType mSayRange; SignaledType mShoutRange; diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index a27ae92ba4..c1884ec800 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -44,6 +44,10 @@ // FIRE-1874: Show server channel in statusbar #include "llappviewer.h" +// FIRE-10549 etc, incorrect grid URL on HG back links +#include "fsgridhandler.h" +#include "lfsimfeaturehandler.h" +// //static void LLAgentUI::buildFullname(std::string& name) @@ -55,15 +59,21 @@ void LLAgentUI::buildFullname(std::string& name) //static void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) { - LLSLURL return_slurl; - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp) - { + LLSLURL return_slurl; + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { // Aurora-sim var region teleports - //return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); - return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionAgent()); +#ifdef OPENSIM + if(LLGridManager::instance().isInOpenSim()) + { + return_slurl = LLSLURL(LFSimFeatureHandler::getInstance()->gridURL(), regionp->getName(), gAgent.getPositionAgent()); + } +#else + return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); +#endif // - } + } slurl = return_slurl; }