diff options
| author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-11 11:14:45 -0700 |
|---|---|---|
| committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-11 11:14:45 -0700 |
| commit | 02c86086acceb83fcddad763123b532c70641688 (patch) | |
| tree | a7a220131b5b491d5c0823df1c07ee86a97e2a77 /indra/newview/llworldmapview.cpp | |
| parent | 5748a14f5d7e85230e74c330a7c2b058856be9cd (diff) | |
| parent | 9c94b76ec10cb5a323f5f8c5c1e8340f40c3b175 (diff) | |
Merge with Sabin
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
| -rw-r--r-- | indra/newview/llworldmapview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 99f559cc79..2e18b710a7 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -305,8 +305,8 @@ void LLWorldMapView::draw() const S32 width = getRect().getWidth(); const S32 height = getRect().getHeight(); - const S32 half_width = width / 2; - const S32 half_height = height / 2; + const F32 half_width = F32(width) / 2.0f; + const F32 half_height = F32(height) / 2.0f; LLVector3d camera_global = gAgent.getCameraPositionGlobal(); LLLocalClipRect clip(getLocalRect()); @@ -350,8 +350,8 @@ void LLWorldMapView::draw() // Find x and y position relative to camera's center. LLVector3d rel_region_pos = origin_global - camera_global; - S32 relative_x = lltrunc((rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale); - S32 relative_y = lltrunc((rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale); + F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale; + F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale; F32 pix_width = gMapScale*(layer->LayerExtents.getWidth() + 1); F32 pix_height = gMapScale*(layer->LayerExtents.getHeight() + 1); @@ -456,8 +456,8 @@ void LLWorldMapView::draw() // Find x and y position relative to camera's center. LLVector3d rel_region_pos = origin_global - camera_global; - S32 relative_x = lltrunc((rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale); - S32 relative_y = lltrunc((rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale); + F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * gMapScale; + F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * gMapScale; // When the view isn't panned, 0,0 = center of rectangle F32 bottom = sPanY + half_height + relative_y; |
