summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-06-22 21:15:27 +0000
committerpeter1138 <peter1138@openttd.org>2006-06-22 21:15:27 +0000
commit191023787a8ed9194159420a6a47a0aeb59d5e09 (patch)
tree4762f0c461eb14f87e356bff742e769215de191f /aircraft_gui.c
parentfed615a99726980a2d92edbc7f3b735d19156e5b (diff)
downloadopenttd-191023787a8ed9194159420a6a47a0aeb59d5e09.tar.xz
(svn r5336) - NewGRF: draw custom helicopter rotor sprites in vehicle info window, ensuring the correct direction is used (inspiration from mart3p)
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 204f5ad48..d4ec54d8f 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -79,7 +79,11 @@ static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selectio
{
PalSpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(GetAircraftImage(v, DIR_W) | pal, x + 25, y + 10);
- if (v->subtype == 0) DrawSprite(SPR_ROTOR_STOPPED, x + 25, y + 5);
+ if (v->subtype == 0) {
+ SpriteID rotor_sprite = GetCustomRotorSprite(v, true);
+ if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
+ DrawSprite(rotor_sprite, x + 25, y + 5);
+ }
if (v->index == selection) {
DrawFrameRect(x - 1, y - 1, x + 58, y + 21, 0xF, FR_BORDERONLY);
}