diff options
author | peter1138 <peter1138@openttd.org> | 2006-11-01 22:27:16 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-11-01 22:27:16 +0000 |
commit | ee3e0cf5e4aea22464674fa61d588788a616bfd1 (patch) | |
tree | e42f01903b70707b464be509d5a5ee593a031c08 | |
parent | 03ba02aef8e85f835f94da8b4b01ccbce51bddcc (diff) | |
download | openttd-ee3e0cf5e4aea22464674fa61d588788a616bfd1.tar.xz |
(svn r7032) - Fix (r1704): Sprite index wasn't updated with correct image number if
custom image lookup fails.
-rw-r--r-- | aircraft_cmd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 097641a66..d6661266a 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -144,8 +144,10 @@ void DrawAircraftEngine(int x, int y, EngineID engine, uint32 image_ormod) if (is_custom_sprite(spritenum)) { sprite = GetCustomVehicleIcon(engine, DIR_W); - if (!sprite) + if (sprite == 0) { spritenum = orig_aircraft_vehicle_info[engine - AIRCRAFT_ENGINES_INDEX].image_index; + sprite = (6 + _aircraft_sprite[spritenum]); + } } DrawSprite(sprite | image_ormod, x, y); |