From 67f549d86d081740a2cd17a399e8810badf4326d Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 31 Jul 2014 11:29:26 -0400 Subject: [PATCH] SimFeaturesHandler: Work around grids where OpenSimExtras aren't implemented by not overriding hg strings there. --- indra/newview/lfsimfeaturehandler.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/indra/newview/lfsimfeaturehandler.cpp b/indra/newview/lfsimfeaturehandler.cpp index 38b0b8c63..e5c44a9ce 100644 --- a/indra/newview/lfsimfeaturehandler.cpp +++ b/indra/newview/lfsimfeaturehandler.cpp @@ -62,15 +62,21 @@ void LFSimFeatureHandler::setSupportedFeatures() { LLSD info; region->getSimulatorFeatures(info); + bool hg(!gHippoGridManager->getCurrentGrid()->isAvination()); // Singu Note: There should be a flag for this some day. + static bool init(false); // This could be a grid where OpenSimExtras aren't implemented, in that case, don't alter the hg specific members. if (info.has("OpenSimExtras")) // OpenSim specific sim features { // For definition of OpenSimExtras please see // http://opensimulator.org/wiki/SimulatorFeatures_Extras const LLSD& extras(info["OpenSimExtras"]); mSupportsExport = extras.has("ExportSupported") ? extras["ExportSupported"].asBoolean() : false; - mDestinationGuideURL = extras.has("destination-guide-url") ? extras["destination-guide-url"].asString() : ""; - mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : ""; - mSearchURL = extras.has("search-server-url") ? extras["search-server-url"].asString() : ""; + if (hg) + { + mDestinationGuideURL = extras.has("destination-guide-url") ? extras["destination-guide-url"].asString() : ""; + mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : ""; + mSearchURL = extras.has("search-server-url") ? extras["search-server-url"].asString() : ""; + init = true; + } mSayRange = extras.has("say-range") ? extras["say-range"].asInteger() : 20; mShoutRange = extras.has("shout-range") ? extras["shout-range"].asInteger() : 100; mWhisperRange = extras.has("whisper-range") ? extras["whisper-range"].asInteger() : 10; @@ -78,8 +84,11 @@ void LFSimFeatureHandler::setSupportedFeatures() else // OpenSim specifics are unsupported reset all to default { mSupportsExport = false; - mMapServerURL = ""; - mSearchURL = ""; + if (hg && init) + { + mMapServerURL = ""; + mSearchURL = ""; + } mSayRange = 20; mShoutRange = 100; mWhisperRange = 10;