(svn r7032) - Fix (r1704): Sprite index wasn't updated with correct image number if

custom image lookup fails.
This commit is contained in:
peter1138 2006-11-01 22:27:16 +00:00
parent 03ba02aef8
commit ee3e0cf5e4
1 changed files with 3 additions and 1 deletions

View File

@ -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);