From 57648cf4e932a6bf23bb9d2b29367ecbda7522c3 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Sat, 17 Mar 2018 17:22:48 +0100 Subject: [PATCH] fixup --- src/units/drawer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/units/drawer.cpp b/src/units/drawer.cpp index d2a856d0441c..41ae2591dc3c 100644 --- a/src/units/drawer.cpp +++ b/src/units/drawer.cpp @@ -232,12 +232,12 @@ void unit_drawer::redraw_unit (const unit & u) const int yoff; if(cfg_offset_x.empty() && cfg_offset_y.empty()) { const surface unit_img = image::get_image(u.default_anim_image(), image::SCALED_TO_ZOOM); - const int xoff = unit_img.null() ? hex_size_by_2 : (hex_size - unit_img->w)/2; - const int yoff = unit_img.null() ? hex_size_by_2 : (hex_size - unit_img->h)/2; + xoff = unit_img.null() ? hex_size_by_2 : (hex_size - unit_img->w)/2; + yoff = unit_img.null() ? hex_size_by_2 : (hex_size - unit_img->h)/2; } else { - const int xoff = hex_size_by_2 + cfg_offset_x; - const int yoff = hex_size_by_2 + cfg_offset_y; + xoff = hex_size_by_2 + cfg_offset_x.to_int(); + yoff = hex_size_by_2 + cfg_offset_y.to_int(); } /*static*/ const image::locator partmoved_orb(game_config::images::orb + "~RC(magenta>" +