(svn r1015) MFM r789

Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
This commit is contained in:
tron
2004-12-11 10:17:10 +00:00
parent 2dd36c2012
commit 03910ce7e9
6 changed files with 17 additions and 9 deletions

View File

@@ -22,6 +22,13 @@ void VehicleServiceInDepot(Vehicle *v)
v->reliability = _engines[v->engine_type].reliability;
}
bool VehicleNeedsService(const Vehicle *v)
{
return _patches.servint_ispercent ?
(v->reliability < _engines[v->engine_type].reliability * (100 - v->service_interval) / 100) :
(v->date_of_last_service + v->service_interval < _date);
}
Order UnpackOldOrder(uint16 packed)
{
Order order;