diff options
| -rw-r--r-- | indra/newview/llworldmap.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llworldmapview.cpp | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 798462748d..c7c8404eb9 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -623,7 +623,7 @@ void LLWorldMap::updateRegions(S32 x0, S32 y0, S32 x1, S32 y1) block_y0 = llmax(block_y0, 0); block_y1 = llmin(block_y1, MAP_BLOCK_RES - 1); - // Process blocks, grouping unloaded blocks into larger requests up to MAX_BLOCKS + // Process blocks, grouping unloaded blocks into larger requests up to MAX_TOTAL_BLOCKS for (S32 block_y = block_y0; block_y <= block_y1; ) { for (S32 block_x = block_x0; block_x <= block_x1; ) @@ -651,7 +651,7 @@ void LLWorldMap::updateRegions(S32 x0, S32 y0, S32 x1, S32 y1) // Expand height (check vertical contiguous unloaded blocks) while (request_height < MAX_BLOCKS_PER_SIDE && (block_y + request_height) <= block_y1 && - (request_width * request_height < MAX_TOTAL_BLOCKS)) // Don't exceed 64 total regions + (request_width * (request_height + 1) <= MAX_TOTAL_BLOCKS)) // Don't exceed 64 total regions { bool can_expand = true; // Width can be >1, loop over blocks in the line diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 1be6a6cfff..8e7b86eb00 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1737,8 +1737,11 @@ void LLWorldMapView::updateVisibleBlocks() const F32 half_height = F32(height) / 2.0f; // Compute center into sim grid coordinates - S32 world_center_x = S32((-mPanX / mMapScale) + (camera_global.mdV[0] / REGION_WIDTH_METERS)); - S32 world_center_y = S32((-mPanY / mMapScale) + (camera_global.mdV[1] / REGION_WIDTH_METERS)); + // mPanX and mPanY values can be obsolete as they are used for + // animation and there is no point loading regions we will see + // so briefly, they won't have time to load. Use target directly. + S32 world_center_x = S32((-mTargetPanX / mMapScale) + (camera_global.mdV[0] / REGION_WIDTH_METERS)); + S32 world_center_y = S32((-mTargetPanY / mMapScale) + (camera_global.mdV[1] / REGION_WIDTH_METERS)); // Compute the boundaries into sim grid coordinates S32 world_left = world_center_x - S32(half_width / mMapScale) - 1; |
