summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/aircraft_cmd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index b96a87e04..e1ebdba0f 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -191,15 +191,17 @@ void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal)
{
const AircraftVehicleInfo* avi = AircraftVehInfo(engine);
int spritenum = avi->image_index;
- SpriteID sprite = (6 + _aircraft_sprite[spritenum]);
+ SpriteID sprite = 0;
if (is_custom_sprite(spritenum)) {
sprite = GetCustomVehicleIcon(engine, DIR_W);
if (sprite == 0) {
spritenum = _orig_aircraft_vehicle_info[engine - AIRCRAFT_ENGINES_INDEX].image_index;
- sprite = (6 + _aircraft_sprite[spritenum]);
}
}
+ if (sprite == 0) {
+ sprite = 6 + _aircraft_sprite[spritenum];
+ }
DrawSprite(sprite, pal, x, y);