diff options
Diffstat (limited to 'indra/newview/llnetmap.cpp')
-rw-r--r-- | indra/newview/llnetmap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index fd968d9027..3f370b1ab5 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -435,7 +435,7 @@ void LLNetMap::draw() } F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), - LLVector2(local_mouse_x,local_mouse_y)); + LLVector2((F32)local_mouse_x, (F32)local_mouse_y)); if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared) { closest_dist_squared = dist_to_cursor_squared; @@ -475,7 +475,7 @@ void LLNetMap::draw() dot_width); F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), - LLVector2(local_mouse_x,local_mouse_y)); + LLVector2((F32)local_mouse_x, (F32)local_mouse_y)); if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared) { mClosestAgentToCursor = gAgent.getID(); @@ -671,7 +671,7 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) bool LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks) { // note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in - F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks); + F32 new_scale = mScale * (F32)pow(MAP_SCALE_ZOOM_FACTOR, -clicks); F32 old_scale = mScale; setScale(new_scale); @@ -681,8 +681,8 @@ bool LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks) { // Adjust pan to center the zoom on the mouse pointer LLVector2 zoom_offset; - zoom_offset.mV[VX] = x - getRect().getWidth() / 2; - zoom_offset.mV[VY] = y - getRect().getHeight() / 2; + zoom_offset.mV[VX] = (F32)(x - getRect().getWidth() / 2); + zoom_offset.mV[VY] = (F32)(y - getRect().getHeight() / 2); mCurPan -= zoom_offset * mScale / old_scale - zoom_offset; } |