Confirm to new OpenSimExtras specification of SimulatorFeatures cap
See: http://opensimulator.org/wiki/SimulatorFeatures_Extras * Moved SupportsExport inside this map to avoid possible collision with Linden Lab * Added the ability for a sim to specify map server (Fixes maps after hypergrid jumps)
This commit is contained in:
@@ -54,7 +54,11 @@ void LFSimFeatureHandler::setSupportedFeatures()
|
||||
region->getSimulatorFeatures(info);
|
||||
//if (!gHippoGridManager->getCurrentGrid()->isSecondLife()) // Non-SL specific sim features
|
||||
{
|
||||
mSupportsExport = info.has("ExportSupported");
|
||||
// For definition of OpenSimExtras please see
|
||||
// http://opensimulator.org/wiki/SimulatorFeatures_Extras
|
||||
mSupportsExport = info["OpenSimExtras"]["ExportSupported"].asBoolean();
|
||||
mMapServerURL = info["OpenSimExtras"]["map-server-url"].asString();
|
||||
mSearchURL = info["OpenSimExtras"]["search-server-url"].asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,10 +60,14 @@ public:
|
||||
|
||||
// Accessors
|
||||
bool simSupportsExport() const { return mSupportsExport; }
|
||||
std::string mapServerURL() const { return mMapServerURL; }
|
||||
std::string searchURL() const { return mSearchURL; }
|
||||
|
||||
private:
|
||||
// SignaledTypes
|
||||
SignaledType<bool> mSupportsExport;
|
||||
std::string mMapServerURL;
|
||||
std::string mSearchURL;
|
||||
};
|
||||
|
||||
#endif //LFSIMFEATUREHANDLER_H
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "llregionflags.h"
|
||||
#include "llworldmapmessage.h"
|
||||
#include "hippogridmanager.h"
|
||||
#include "lfsimfeaturehandler.h"
|
||||
|
||||
bool LLWorldMap::sGotMapURL = false;
|
||||
// Timers to temporise database requests
|
||||
@@ -512,7 +513,7 @@ bool LLWorldMap::useWebMapTiles()
|
||||
{
|
||||
static const LLCachedControl<bool> use_web_map_tiles("UseWebMapTiles",false);
|
||||
return use_web_map_tiles &&
|
||||
(( gHippoGridManager->getConnectedGrid()->isSecondLife() || sGotMapURL));
|
||||
(( gHippoGridManager->getConnectedGrid()->isSecondLife() || sGotMapURL || !LFSimFeatureHandler::instance().mapServerURL().empty()));
|
||||
}
|
||||
|
||||
void LLWorldMap::reloadItems(bool force)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "math.h" // log()
|
||||
#include "lfsimfeaturehandler.h"
|
||||
|
||||
// Turn this on to output tile stats in the standard output
|
||||
#define DEBUG_TILES_STAT 0
|
||||
@@ -187,7 +188,9 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
|
||||
LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level)
|
||||
{
|
||||
// Get the grid coordinates
|
||||
std::string imageurl = gSavedSettings.getString("MapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y);
|
||||
std::string simOverrideMap = LFSimFeatureHandler::instance().mapServerURL();
|
||||
std::string imageurl = (simOverrideMap.empty() ? gSavedSettings.getString("MapServerURL") : simOverrideMap)
|
||||
+ llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y);
|
||||
|
||||
// DO NOT COMMIT!! DEBUG ONLY!!!
|
||||
// Use a local jpeg for every tile to test map speed without S3 access
|
||||
|
||||
Reference in New Issue
Block a user