summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-02-17 11:17:49 +0000
committerbjarni <bjarni@openttd.org>2007-02-17 11:17:49 +0000
commita66176c89414b14adbfbb47631360a6186e41174 (patch)
treeb72fd6d94f26147655de80f82b5366176a3676d0
parentf6f045055af35e7ac335cd072a10f0fa7e32dfad (diff)
downloadopenttd-a66176c89414b14adbfbb47631360a6186e41174.tar.xz
(svn r8770) -Fix r8661: corrected some aircraft sprite placement issues in the depot window
-rw-r--r--src/depot_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 30ec382ba..66e7cde32 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -185,8 +185,9 @@ static void DrawVehicleInDepot(Window *w, const Vehicle *v, int x, int y)
case VEH_Ship: DrawShipImage( v, x + 19, sprite_y - 1, WP(w, depot_d).sel); break;
case VEH_Aircraft: {
const Sprite *spr = GetSprite(GetAircraftImage(v, DIR_W));
- int diff_y = spr->y_offs + spr->height - 12;
- DrawAircraftImage(v, x + 12, y + diff_y, WP(w, depot_d).sel);
+ DrawAircraftImage(v, x + 12,
+ y + max(spr->height + spr->y_offs - 14, 0), // tall sprites needs an y offset
+ WP(w, depot_d).sel);
} break;
default: NOT_REACHED();
}