mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r7032) - Fix (r1704): Sprite index wasn't updated with correct image number if
custom image lookup fails.
This commit is contained in:
parent
03ba02aef8
commit
ee3e0cf5e4
|
@ -144,8 +144,10 @@ void DrawAircraftEngine(int x, int y, EngineID engine, uint32 image_ormod)
|
||||||
|
|
||||||
if (is_custom_sprite(spritenum)) {
|
if (is_custom_sprite(spritenum)) {
|
||||||
sprite = GetCustomVehicleIcon(engine, DIR_W);
|
sprite = GetCustomVehicleIcon(engine, DIR_W);
|
||||||
if (!sprite)
|
if (sprite == 0) {
|
||||||
spritenum = orig_aircraft_vehicle_info[engine - AIRCRAFT_ENGINES_INDEX].image_index;
|
spritenum = orig_aircraft_vehicle_info[engine - AIRCRAFT_ENGINES_INDEX].image_index;
|
||||||
|
sprite = (6 + _aircraft_sprite[spritenum]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawSprite(sprite | image_ormod, x, y);
|
DrawSprite(sprite | image_ormod, x, y);
|
||||||
|
|
Loading…
Reference in New Issue