aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworldmapview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llworldmapview.cpp')
-rw-r--r--linden/indra/newview/llworldmapview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp
index 08a6118..4c40957 100644
--- a/linden/indra/newview/llworldmapview.cpp
+++ b/linden/indra/newview/llworldmapview.cpp
@@ -305,8 +305,8 @@ void LLWorldMapView::draw()
305 305
306 const S32 width = getRect().getWidth(); 306 const S32 width = getRect().getWidth();
307 const S32 height = getRect().getHeight(); 307 const S32 height = getRect().getHeight();
308 const S32 half_width = width / 2; 308 const F32 half_width = F32(width) / 2.0f;
309 const S32 half_height = height / 2; 309 const F32 half_height = F32(height) / 2.0f;
310 LLVector3d camera_global = gAgent.getCameraPositionGlobal(); 310 LLVector3d camera_global = gAgent.getCameraPositionGlobal();
311 311
312 LLLocalClipRect clip(getLocalRect()); 312 LLLocalClipRect clip(getLocalRect());
@@ -350,8 +350,8 @@ void LLWorldMapView::draw()
350 350
351 // Find x and y position relative to camera's center. 351 // Find x and y position relative to camera's center.
352 LLVector3d rel_region_pos = origin_global - camera_global; 352 LLVector3d rel_region_pos = origin_global - camera_global;
353 S32 relative_x = lltrunc((rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale); 353 F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale;
354 S32 relative_y = lltrunc((rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale); 354 F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale;
355 355
356 F32 pix_width = gMapScale*(layer->LayerExtents.getWidth() + 1); 356 F32 pix_width = gMapScale*(layer->LayerExtents.getWidth() + 1);
357 F32 pix_height = gMapScale*(layer->LayerExtents.getHeight() + 1); 357 F32 pix_height = gMapScale*(layer->LayerExtents.getHeight() + 1);
@@ -456,8 +456,8 @@ void LLWorldMapView::draw()
456 456
457 // Find x and y position relative to camera's center. 457 // Find x and y position relative to camera's center.
458 LLVector3d rel_region_pos = origin_global - camera_global; 458 LLVector3d rel_region_pos = origin_global - camera_global;
459 S32 relative_x = lltrunc((rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale); 459 F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale;
460 S32 relative_y = lltrunc((rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale); 460 F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale;
461 461
462 // When the view isn't panned, 0,0 = center of rectangle 462 // When the view isn't panned, 0,0 = center of rectangle
463 F32 bottom = sPanY + half_height + relative_y; 463 F32 bottom = sPanY + half_height + relative_y;