(svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types

This commit is contained in:
smatz
2009-05-26 22:10:13 +00:00
parent aa546e513f
commit 7ee882d03f
15 changed files with 150 additions and 135 deletions

View File

@@ -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 */