Added better opensim support, snowglobe doesnt like opensim that much...
this might also break proxy...
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -117,6 +117,9 @@ public:
|
||||
|
||||
const S32 getAgentCount() const; // Compute the total agents count
|
||||
LLPointer<LLViewerImage> getLandForSaleImage(); // Get the overlay image, fetch it if necessary
|
||||
// <edit>
|
||||
//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<LLViewerImage> mOverlayImage; // Reference to the overlay image
|
||||
|
||||
// Items for this region
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
#include "llworldmap.h"
|
||||
#include "llagent.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
// <edit>
|
||||
#include "llviewernetwork.h" //for isInProductionGrid()
|
||||
// </edit>
|
||||
|
||||
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
|
||||
//<edit>
|
||||
&& LLViewerLogin::getInstance()->getGridChoice() < GRID_INFO_OTHER)
|
||||
{
|
||||
llwarns << "Invalid map image type returned! layer = " << agent_flags << llendl;
|
||||
return;
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
|
||||
#include "llviewerimagelist.h"
|
||||
#include "math.h" // log()
|
||||
// <edit>
|
||||
#include "llworldmap.h"
|
||||
#include "llviewernetwork.h" //for isProductionGrid();
|
||||
// </edit>
|
||||
|
||||
// Turn this on to output tile stats in the standard output
|
||||
#define DEBUG_TILES_STAT 0
|
||||
@@ -152,7 +156,23 @@ LLPointer<LLViewerImage> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S
|
||||
if (load)
|
||||
{
|
||||
// Load it
|
||||
LLPointer<LLViewerImage> img = loadObjectsTile(grid_x, grid_y, level);
|
||||
LLPointer<LLViewerImage> img;
|
||||
// <edit>
|
||||
//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;
|
||||
}
|
||||
// </edit>
|
||||
// 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...)
|
||||
|
||||
Reference in New Issue
Block a user