From 02bf3ed5c07451ae860bf4a197fca00908eb4293 Mon Sep 17 00:00:00 2001 From: bjarni Date: Thu, 9 Dec 2004 21:46:56 +0000 Subject: (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--) --- train_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index 249cd1ab4..1b79001fc 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1288,6 +1288,7 @@ static bool CheckTrainStayInDepot(Vehicle *v) return true; } + VehicleServiceInDepot(v); TrainPlayLeaveStationSound(v); v->u.rail.track = 1; @@ -2554,9 +2555,8 @@ void TrainEnterDepot(Vehicle *v, uint tile) if (v->subtype != 0) v = GetFirstVehicleInChain(v); - 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); v->load_unload_time_rem = 0; -- cgit v1.2.3-54-g00ecf