diff options
author | peter1138 <peter1138@openttd.org> | 2006-01-12 15:52:18 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-01-12 15:52:18 +0000 |
commit | 90aff7a026c8e833d78e932575995485c2da9e47 (patch) | |
tree | 2a159338918aa7b1a61fab6e18f4e28ae2b27950 /aircraft_cmd.c | |
parent | 28ca056d56bb716e125745c16876408527fdc278 (diff) | |
download | openttd-90aff7a026c8e833d78e932575995485c2da9e47.tar.xz |
(svn r3396) - Autoreplace changes:
- Change fixed array per player to a single pool. This avoids future problems
with vehicle numbers and decreases savegame size. Engine replacements from
previous savegames will be lost.
- Move engine replacement code from players.c to engine.c.
(thanks to blathijs for rewriting this)
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r-- | aircraft_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 710ca24d5..668174314 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -1450,7 +1450,7 @@ static void AircraftEventHandler_HeliTakeOff(Vehicle *v, const AirportFTAClass * // check if the aircraft needs to be replaced or renewed and send it to a hangar if needed if (v->owner == _local_player && ( - EngineHasReplacement(p, v->engine_type) || + EngineHasReplacementForPlayer(p, v->engine_type) || (p->engine_renew && v->age - v->max_age > p->engine_renew_months * 30) )) { _current_player = _local_player; @@ -1514,7 +1514,7 @@ static void AircraftEventHandler_Landing(Vehicle *v, const AirportFTAClass *Airp // check if the aircraft needs to be replaced or renewed and send it to a hangar if needed if (v->current_order.type != OT_GOTO_DEPOT && v->owner == _local_player) { // only the vehicle owner needs to calculate the rest (locally) - if (EngineHasReplacement(p, v->engine_type) || + if (EngineHasReplacementForPlayer(p, v->engine_type) || (p->engine_renew && v->age - v->max_age > (p->engine_renew_months * 30))) { // send the aircraft to the hangar at next airport (bit 17 set) _current_player = _local_player; |