forked from mirror/OpenTTD
(svn r3564) Several smaller changes:
- Don't treat non-booleans as booleans - Reduce variable scope - Bracing - Use DeMorgan's law to make conditionals easier to read - if cascade -> switch - Replace some magic numbers by symbolic names - Avoid assignments within other statements
This commit is contained in:
@@ -98,7 +98,7 @@ int GetAircraftImage(const Vehicle *v, byte direction)
|
||||
if (is_custom_sprite(spritenum)) {
|
||||
int sprite = GetCustomVehicleSprite(v, direction);
|
||||
|
||||
if (sprite) return sprite;
|
||||
if (sprite != 0) return sprite;
|
||||
spritenum = orig_aircraft_vehicle_info[v->engine_type - AIRCRAFT_ENGINES_INDEX].image_index;
|
||||
}
|
||||
return direction + _aircraft_sprite[spritenum];
|
||||
|
Reference in New Issue
Block a user