summaryrefslogtreecommitdiff
path: root/src/ai/default/default.cpp
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-01-27 12:29:55 +0000
committerDarkvater <Darkvater@openttd.org>2007-01-27 12:29:55 +0000
commit2ff4492abc0a131613a4ec983f862a30b0781029 (patch)
treec85d1c112d4c04fb8079a90418ad3b654765dff3 /src/ai/default/default.cpp
parent36039f318d71109eeb693f58661238966fa44e14 (diff)
downloadopenttd-2ff4492abc0a131613a4ec983f862a30b0781029.tar.xz
(svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r--src/ai/default/default.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 7316b5648..ed805fb43 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -95,7 +95,7 @@ static void AiStateVehLoop(Player *p)
if ((v->type == VEH_Train && v->subtype == 0) ||
v->type == VEH_Road ||
- (v->type == VEH_Aircraft && v->subtype <= 2) ||
+ (v->type == VEH_Aircraft && IsNormalAircraft(v)) ||
v->type == VEH_Ship) {
/* replace engine? */
if (v->type == VEH_Train && v->engine_type < 3 &&