aircraft_cmd.c
changeset 1897 98b62e167a43
parent 1891 92a3b0aa0946
child 1901 fb05044cf5c3
--- a/aircraft_cmd.c	Fri Jun 03 12:09:55 2005 +0000
+++ b/aircraft_cmd.c	Fri Jun 03 22:25:06 2005 +0000
@@ -823,12 +823,11 @@
 // get Aircraft running altitude
 static byte GetAircraftFlyingAltitude(const Vehicle *v)
 {
-	byte maxz = 162;
-	if (v->max_speed != 37) {
-		maxz = 171;
-		if (v->max_speed != 74) {maxz = 180;}
+	switch (v->max_speed) {
+		case 37: return 162;
+		case 74: return 171;
+		default: return 180;
 	}
-	return maxz;
 }
 
 static bool AircraftController(Vehicle *v)