flying units are no longer buried in a castle (patch #709)

This commit is contained in:
Mark de Wever 2007-03-30 17:08:52 +00:00
parent 9f525624ee
commit 53214f38b6
3 changed files with 7 additions and 2 deletions

View File

@ -33,6 +33,7 @@ Version 1.3.1+svn:
* the movement text is also scaled now (bug #6876, patch patch #693)
* fix glitches when scrolling the map if zoomed out (bug #8768)
* fix the right border glitch of the map when zooming (bug #6060 and others)
* flying units are no longer buried in a castle (patch #709)
* scenery
* added animated windmill, fancy and damaged tents, icepack, and shipwreck
* language and i18n:

View File

@ -28,6 +28,7 @@ Version 1.3.1+svn:
* Haloes in tiny gui are now scaled (before unscaled, thus a factor 2 bigger
as intended).
* Fix some glitches when scrolling or zooming the map.
* Flying units are no longer buried in a castle.
* Units changes and balancing:
* Converted the cold resistance of the Elvish Sorceress line to a holy

View File

@ -1766,8 +1766,11 @@ void unit::redraw_unit(display& disp,gamemap::location hex)
if(!anim_) set_standing(disp,hex);
const t_translation::t_letter terrain = map.get_terrain(hex);
const double submerge = is_flying() ? 0.0 : map.get_terrain_info(terrain).unit_submerge() * disp.zoom();
const int height_adjust = is_flying() ? 0 : int(map.get_terrain_info(terrain).unit_height_adjust() * disp.zoom());
const terrain_type& terrain_info = map.get_terrain_info(terrain);
const double submerge = is_flying() ? 0.0 : terrain_info.unit_submerge() * disp.zoom();
int height_adjust = terrain_info.unit_height_adjust();
if (is_flying() && height_adjust <= 0) height_adjust = 0;
else height_adjust = int(height_adjust * disp.zoom());
unit_frame current_frame;
if(anim_->animation_finished()) current_frame = anim_->get_last_frame();