summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-06 09:18:04 +0000
committertron <tron@openttd.org>2006-02-06 09:18:04 +0000
commit453b30e387f8d8ab1839d96b0d1f9a8fea841292 (patch)
tree3a4002304d8204d11c37ba706d6ffbd2e5dfac1b /aircraft_cmd.c
parent0755bbead0240f519c9d78bb88ef4629d5ab8fa5 (diff)
downloadopenttd-453b30e387f8d8ab1839d96b0d1f9a8fea841292.tar.xz
(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
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 631166ec7..d1cc12a46 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -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];