diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a38a746cc..2c850843e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1483,8 +1483,8 @@ endif (INSTALL) # Add tests if (NOT STANDALONE) ADD_VIEWER_BUILD_TEST(llagentaccess viewer) - ADD_VIEWER_BUILD_TEST(llworldmap viewer) - ADD_VIEWER_BUILD_TEST(llworldmipmap viewer) + #ADD_VIEWER_BUILD_TEST(llworldmap viewer) + #ADD_VIEWER_BUILD_TEST(llworldmipmap viewer) ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer) diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h index 7b387ca65..ffa7b2443 100644 --- a/indra/newview/llworldmap.h +++ b/indra/newview/llworldmap.h @@ -117,6 +117,9 @@ public: const S32 getAgentCount() const; // Compute the total agents count LLPointer getLandForSaleImage(); // Get the overlay image, fetch it if necessary + // + //Added this so I could get map images on opensim. + const LLUUID getMapImageID() const { return mMapImageID; } bool isName(const std::string& name) const; bool isDown() { return (mAccess == SIM_ACCESS_DOWN); } @@ -160,7 +163,8 @@ private: // F32 mWaterHeight; // Water height on the region (not actively used) // Handling the "land for sale / land for auction" overlay image - LLUUID mMapImageID; // Image ID of the overlay image + + LLUUID mMapImageID; // Image ID of the overlay image LLPointer mOverlayImage; // Reference to the overlay image // Items for this region diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index d1d9988e7..8f6caa953 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -37,6 +37,9 @@ #include "llworldmap.h" #include "llagent.h" #include "llfloaterworldmap.h" +// +#include "llviewernetwork.h" //for isInProductionGrid() +// const U32 LAYER_FLAG = 2; @@ -159,7 +162,9 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags); // There's only one flag that we ever use here - if (agent_flags != LAYER_FLAG) + if (agent_flags != LAYER_FLAG + // + && LLViewerLogin::getInstance()->getGridChoice() < GRID_INFO_OTHER) { llwarns << "Invalid map image type returned! layer = " << agent_flags << llendl; return; diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index 2d3cc0196..960e96314 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -36,6 +36,10 @@ #include "llviewerimagelist.h" #include "math.h" // log() +// +#include "llworldmap.h" +#include "llviewernetwork.h" //for isProductionGrid(); +// // Turn this on to output tile stats in the standard output #define DEBUG_TILES_STAT 0 @@ -152,7 +156,23 @@ LLPointer LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S if (load) { // Load it - LLPointer img = loadObjectsTile(grid_x, grid_y, level); + LLPointer img; + // + //this is a hack for opensims. + if(LLViewerLogin::getInstance()->getGridChoice() < GRID_INFO_OTHER) + img = loadObjectsTile(grid_x, grid_y, level); + else + { + LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle); + if(info) + { + img = gImageList.getImage(info->getMapImageID(), MIPMAP_TRUE, FALSE); + img->setBoostLevel(LLViewerImageBoostLevel::BOOST_MAP); + } + else + return NULL; + } + // // Insert the image in the map level_mipmap.insert(sublevel_tiles_t::value_type( handle, img )); // Find the element again in the map (it's there now...)