summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-19 09:40:18 +0000
committerrubidium <rubidium@openttd.org>2007-05-19 09:40:18 +0000
commit8f0f090c5139465bb2db1bf280886a563a68385d (patch)
treefcea59953bd1ce2ff5f0302669d3649bf7ca78bb /src/aircraft_cmd.cpp
parent9a4b4ba4484112c7eefa6ed134ec4d725be7d2a7 (diff)
downloadopenttd-8f0f090c5139465bb2db1bf280886a563a68385d.tar.xz
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 0d4c3ba10..90192e023 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1684,7 +1684,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
* unless it is due for renewal but the engine is no longer available */
if (v->owner == _local_player && (
- EngineHasReplacementForPlayer(p, v->engine_type) ||
+ EngineHasReplacementForPlayer(p, v->engine_type, v->group_id) ||
((p->engine_renew && v->age - v->max_age > p->engine_renew_months * 30) &&
HASBIT(GetEngine(v->engine_type)->player_avail, _local_player))
)) {
@@ -1742,7 +1742,7 @@ static void AircraftEventHandler_Landing(Vehicle *v, const AirportFTAClass *apc)
if (v->current_order.type != OT_GOTO_DEPOT && v->owner == _local_player) {
/* only the vehicle owner needs to calculate the rest (locally) */
const Player* p = GetPlayer(v->owner);
- if (EngineHasReplacementForPlayer(p, v->engine_type) ||
+ if (EngineHasReplacementForPlayer(p, v->engine_type, v->group_id) ||
(p->engine_renew && v->age - v->max_age > (p->engine_renew_months * 30))) {
/* send the aircraft to the hangar at next airport */
_current_player = _local_player;