summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-26 22:10:13 +0000
committersmatz <smatz@openttd.org>2009-05-26 22:10:13 +0000
commit7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c (patch)
tree7107a4626a58464bd677e9fb8f7576cadf1b8bf2 /src/aircraft_cmd.cpp
parentaa546e513f6b121377fd1b6cad1b727f89b66528 (diff)
downloadopenttd-7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c.tar.xz
(svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index dc169ff5c..7bf6a79e0 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -2073,10 +2073,9 @@ void UpdateAirplanesOnNewStation(const Station *st)
/* only 1 station is updated per function call, so it is enough to get entry_point once */
const AirportFTAClass *ap = st->Airport();
- Vehicle *u;
- FOR_ALL_VEHICLES(u) {
- if (u->type == VEH_AIRCRAFT && IsNormalAircraft(u)) {
- Aircraft *v = (Aircraft *)u;
+ Aircraft *v;
+ FOR_ALL_AIRCRAFT(v) {
+ if (IsNormalAircraft(v)) {
if (v->targetairport == st->index) { // if heading to this airport
/* update position of airplane. If plane is not flying, landing, or taking off
* you cannot delete airport, so it doesn't matter */