fix an animation glitch at start of movement bug #12923

This commit is contained in:
Jérémy Rosen 2009-02-01 21:56:57 +00:00
parent 18e2ddbf1f
commit f7d925f682
2 changed files with 3 additions and 3 deletions

View file

@ -131,7 +131,9 @@ void move_unit(const std::vector<map_location>& path, unit& u, const std::vector
// Original unit is usually hidden (but still on map, so count is correct)
unit temp_unit = u;
u.set_hidden(true);
temp_unit.set_standing(path[0]);
temp_unit.set_hidden(false);
disp->place_temporary_unit(temp_unit,path[0]);
disp->draw();
for(size_t i = 0; i+1 < path.size(); ++i) {

View file

@ -381,9 +381,7 @@ void unit_frame::redraw(const int frame_time,bool first_time,const map_location
surface image;
if(!image_loc.is_void() && image_loc.get_filename() != "") { // invalid diag image, or not diagonal
image=image::get_image(image_loc,
image::SCALED_TO_ZOOM
);
image=image::get_image(image_loc, image::SCALED_TO_ZOOM);
}
const int x = static_cast<int>(tmp_offset * xdst + (1.0-tmp_offset) * xsrc) + d2;
const int y = static_cast<int>(tmp_offset * ydst + (1.0-tmp_offset) * ysrc) + d2;