(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--)

This commit is contained in:
bjarni
2004-12-09 21:46:56 +00:00
parent 93a4dbda4b
commit 02bf3ed5c0
6 changed files with 19 additions and 12 deletions

View File

@@ -352,6 +352,7 @@ static void CheckShipLeaveDepot(Vehicle *v)
RecalcShipStuff(v);
PlayShipSound(v);
VehicleServiceInDepot(v);
}
static bool ShipAccelerate(Vehicle *v)
@@ -394,9 +395,8 @@ static void ShipEnterDepot(Vehicle *v)
v->cur_speed = 0;
RecalcShipStuff(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);
MaybeRenewVehicle(v, EstimateShipCost(v->engine_type));