summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2004-12-09 21:46:56 +0000
committerbjarni <bjarni@openttd.org>2004-12-09 21:46:56 +0000
commitc6cd07e2e38f49af948f50398ee25b4ea4cef322 (patch)
treedcab8de4962e2d4d20e640fa781a69cd6480a973 /aircraft_cmd.c
parent567ad3b5db9a8372850d1e4b7ae77de932ef4c17 (diff)
downloadopenttd-c6cd07e2e38f49af948f50398ee25b4ea4cef322.tar.xz
(svn r998) now vehicles are serviced both when entering and when leaving depots to prevent that vehicles might need service when leaving after a long stay (ln--)
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 26ebc4211..992900366 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -652,9 +652,7 @@ static void ServiceAircraft(Vehicle *v)
SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
- v->date_of_last_service = _date;
- v->breakdowns_since_last_service = 0;
- v->reliability = _engines[v->engine_type].reliability;
+ VehicleServiceInDepot(v);
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
}
@@ -1234,6 +1232,7 @@ static void AircraftLeaveHangar(Vehicle *v)
}
}
+ VehicleServiceInDepot(v);
SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
}