summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-02-22 19:38:44 +0000
committerDarkvater <darkvater@openttd.org>2005-02-22 19:38:44 +0000
commit1f66d602725c26c3b378724e7c73ecb7493edd9b (patch)
tree8e2c184beea8b06e07df7cc1875678f00f2515b1 /aircraft_cmd.c
parent6805abe0f3976a6bbca32ce3d28bc44789a1802a (diff)
downloadopenttd-1f66d602725c26c3b378724e7c73ecb7493edd9b.tar.xz
(svn r1905) - Fix: [ 1118810 ] openttd: ship_cmd.c:642 ... Assertion failed. Mapwrap fixed in ship_cmd.c (was implicitely ok before biggermaps).
- CodeChange: rename all vehicle controllers to ...Controller for their similar behaviour
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index f9641782f..526acc6c5 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -821,7 +821,7 @@ static byte GetAircraftFlyingAltitude(const Vehicle *v)
return maxz;
}
-static bool Aircraft_5(Vehicle *v)
+static bool AircraftController(Vehicle *v)
{
Station *st;
const AirportMovingData *amd;
@@ -876,7 +876,7 @@ static bool Aircraft_5(Vehicle *v)
if (amd->flag & AMED_HELI_LOWER) {
if (UpdateAircraftSpeed(v)) {
if (st->airport_tile == 0) {
- // FIXME - Aircraft_5 -> if station no longer exists, do not land
+ // FIXME - AircraftController -> if station no longer exists, do not land
// helicopter will circle until sign disappears, then go to next order
// * what to do when it is the only order left, right now it just stays in 1 place
v->u.air.state = FLYING;
@@ -988,8 +988,6 @@ static bool Aircraft_5(Vehicle *v)
if (amd->flag & AMED_LAND) {
if (st->airport_tile == 0) {
- //FIXME -- FIXED - Aircraft_5 -> if station no longer exists, do not land
- // * what to do when it is the only order left, right now it just stays in 1 place?
v->u.air.state = FLYING;
AircraftNextAirportPos_and_Order(v);
// get aircraft back on running altitude
@@ -1725,7 +1723,7 @@ static void AirportClearBlock(Vehicle *v, const AirportFTAClass *Airport)
static void AirportGoToNextPosition(Vehicle *v, const AirportFTAClass *Airport)
{
// if aircraft is not in position, wait until it is
- if (!Aircraft_5(v)) {return;}
+ if (!AircraftController(v)) {return;}
AirportClearBlock(v, Airport);
AirportMove(v, Airport); // move aircraft to next position
@@ -2099,7 +2097,7 @@ void UpdateAirplanesOnNewStation(Station *st)
v->u.air.pos = v->u.air.previous_pos = ap->entry_point;
v->u.air.state = FLYING;
// landing plane needs to be reset to flying height (only if in pause mode upgrade,
- // in normal mode, plane is reset in Aircraft_5. It doesn't hurt for FLYING
+ // in normal mode, plane is reset in AircraftController. It doesn't hurt for FLYING
GetNewVehiclePos(v, &gp);
// set new position x,y,z
SetAircraftPosition(v, gp.x, gp.y, GetAircraftFlyingAltitude(v));