diff options
author | Darkvater <Darkvater@openttd.org> | 2007-01-27 12:29:55 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2007-01-27 12:29:55 +0000 |
commit | 2ff4492abc0a131613a4ec983f862a30b0781029 (patch) | |
tree | c85d1c112d4c04fb8079a90418ad3b654765dff3 /src/engine.cpp | |
parent | 36039f318d71109eeb693f58661238966fa44e14 (diff) | |
download | openttd-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/engine.cpp')
-rw-r--r-- | src/engine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 10a35b9a0..ec4c27ec2 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -14,6 +14,7 @@ #include "saveload.h" #include "variables.h" #include "train.h" +#include "aircraft.h" #include "newgrf_cargo.h" #include "date.h" #include "table/engines.h" @@ -306,7 +307,7 @@ static void NewVehicleAvailable(Engine *e) FOR_ALL_VEHICLES(v) { if (v->type == VEH_Train || v->type == VEH_Road || v->type == VEH_Ship || - (v->type == VEH_Aircraft && v->subtype <= 2)) { + (v->type == VEH_Aircraft && IsNormalAircraft(v))) { if (v->owner == p->index && v->engine_type == index) { /* The user did prove me wrong, so restore old value */ p->block_preview = block_preview; |