diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index d09aa2839..84b491949 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -360,7 +360,7 @@ void LLNetMap::draw() const F32 local_right(local_left + mScale); const F32 local_bottom(bottom + y*mScale); const F32 local_top(local_bottom + mScale); - LLViewerTexture* pRegionImage = tiles[x][y]; + LLViewerTexture* pRegionImage = tiles[x*scaled_width+y]; if (pRegionImage && pRegionImage->hasGLTexture()) { gGL.getTexUnit(0)->bind(pRegionImage); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f3f9f7c34..4a75bc8fc 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -434,8 +434,7 @@ LLViewerRegion::~LLViewerRegion() // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3) for (tex_matrix_t::iterator i = mWorldMapTiles.begin(), iend = mWorldMapTiles.end(); i != iend; ++i) - for (std::vector >::iterator it = (*i).begin(), itend = (*i).end(); it != itend; ++it) - (*it)->setBoostLevel(LLViewerTexture::BOOST_NONE); + (*i)->setBoostLevel(LLViewerTexture::BOOST_NONE); // [/SL:KB] } @@ -1114,17 +1113,17 @@ const LLViewerRegion::tex_matrix_t& LLViewerRegion::getWorldMapTiles() const std::string strImgURL = (simOverrideMap.empty() ? gSavedSettings.getString("MapServerURL") : simOverrideMap) + "map-1-"; U32 totalX(getWidth()/REGION_WIDTH_U32); if (!totalX) ++totalX; // If this region is too small, still get an image. - mWorldMapTiles.resize(totalX); /* TODO: Nonsquare regions? U32 totalY(getLength()/REGION_WIDTH_U32); if (!totalY) ++totalY; // If this region is too small, still get an image. */ const U32 totalY(totalX); + mWorldMapTiles.reserve(totalX*totalY); for (U32 x = 0; x != totalX; ++x) for (U32 y = 0; y != totalY; ++y) { LLPointer tex(LLViewerTextureManager::getFetchedTextureFromUrl(strImgURL+llformat("%d-%d-objects.jpg", gridX + x, gridY + y), TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); - mWorldMapTiles[x].push_back(tex); + mWorldMapTiles.push_back(tex); tex->setBoostLevel(LLViewerTexture::BOOST_MAP); } } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a7f0961d0..cfaef5ebc 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -160,7 +160,7 @@ public: // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0) bool isAlive() const; // can become false if circuit disconnects - typedef std::vector > > tex_matrix_t; + typedef std::vector > tex_matrix_t; const tex_matrix_t& getWorldMapTiles() const; // [/SL:KB]