summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2005-01-28 12:20:06 +0000
committerdominik <dominik@openttd.org>2005-01-28 12:20:06 +0000
commit936979c957ec1e8f993e91d03b4221bfb301e5e5 (patch)
tree82c0bd4ed15595a45ab7eaf413d85ed80757132c
parentea3eb8cbfae13a47d1754236b4229e231227d659 (diff)
downloadopenttd-936979c957ec1e8f993e91d03b4221bfb301e5e5.tar.xz
(svn r1704) - Fix: [newgrf] rotors of custom helicopters are displayed correctly in the hangar window
-rw-r--r--aircraft_cmd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 201cc8bf3..353746f09 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -93,21 +93,19 @@ int GetAircraftImage(Vehicle *v, byte direction)
void DrawAircraftEngine(int x, int y, int engine, uint32 image_ormod)
{
int spritenum = AircraftVehInfo(engine)->image_index;
+ int sprite = (6 + _aircraft_sprite[spritenum]);
if (is_custom_sprite(spritenum)) {
- int sprite = GetCustomVehicleIcon(engine, 6);
-
- if (sprite) {
- DrawSprite(sprite | image_ormod, x, y);
- return;
- }
- spritenum = _engine_original_sprites[engine];
+ sprite = GetCustomVehicleIcon(engine, 6);
+ if (!sprite)
+ sprite = _engine_original_sprites[engine];
}
- DrawSprite((6 + _aircraft_sprite[spritenum]) | image_ormod, x, y);
+ DrawSprite(sprite | image_ormod, x, y);
- if ((AircraftVehInfo(engine)->subtype & 1) == 0)
+ if ((AircraftVehInfo(engine)->subtype & 1) == 0) {
DrawSprite(0xF3D, x, y-5);
+ }
}
void DrawAircraftEngineInfo(int engine, int x, int y, int maxw)