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/player_gui.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/player_gui.cpp')
-rw-r--r-- | src/player_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp index e51a6d4f9..94367e1ad 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -16,6 +16,7 @@ #include "network/network.h" #include "variables.h" #include "train.h" +#include "aircraft.h" #include "date.h" #include "newgrf.h" #include "network/network_data.h" @@ -607,7 +608,7 @@ static void DrawPlayerVehiclesAmount(PlayerID player) switch (v->type) { case VEH_Train: if (IsFrontEngine(v)) train++; break; case VEH_Road: road++; break; - case VEH_Aircraft: if (v->subtype <= 2) air++; break; + case VEH_Aircraft: if (IsNormalAircraft(v)) air++; break; case VEH_Ship: ship++; break; default: break; } |