Mercurial > hg > openttd
changeset 6099:071282ee25fa draft
(svn r8834) -Fix
Do not pass something to a function it better could figure out by itself
author | tron <tron@openttd.org> |
---|---|
date | Wed, 21 Feb 2007 19:49:18 +0000 |
parents | bad21330ae92 |
children | 9bff2e15c516 |
files | src/aircraft_cmd.cpp |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -38,7 +38,6 @@ static bool AirportHasBlock(Vehicle *v, const AirportFTA *current_pos, const AirportFTAClass *apc); static bool AirportFindFreeTerminal(Vehicle *v, const AirportFTAClass *apc); static bool AirportFindFreeHelipad(Vehicle *v, const AirportFTAClass *apc); -static void AirportGoToNextPosition(Vehicle *v, const AirportFTAClass *apc); static void CrashAirplane(Vehicle *v); static void AircraftNextAirportPos_and_Order(Vehicle *v); @@ -1738,11 +1737,13 @@ } } -static void AirportGoToNextPosition(Vehicle *v, const AirportFTAClass *apc) +static void AirportGoToNextPosition(Vehicle *v) { // if aircraft is not in position, wait until it is if (!AircraftController(v)) return; + const AirportFTAClass *apc = GetStation(v->u.air.targetairport)->Airport(); + AirportClearBlock(v, apc); AirportMove(v, apc); // move aircraft to next position } @@ -2006,7 +2007,7 @@ if (v->current_order.type >= OT_LOADING) return; - AirportGoToNextPosition(v, GetStation(v->u.air.targetairport)->Airport()); + AirportGoToNextPosition(v); } void Aircraft_Tick(Vehicle *v)