summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-12-11 10:17:10 +0000
committertron <tron@openttd.org>2004-12-11 10:17:10 +0000
commit0ba5123cef72c427c010f9ce8bcb6003e1de72bd (patch)
treed480e20495e9f20ac7e66ff407aa48a08fcb4321 /vehicle.h
parent5a3ef18c94cabc855b956a2bbcd6a7ed91ea2b2e (diff)
downloadopenttd-0ba5123cef72c427c010f9ce8bcb6003e1de72bd.tar.xz
(svn r1015) MFM r789
Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/vehicle.h b/vehicle.h
index 557536441..fdc91c92f 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -390,6 +390,8 @@ int CheckStoppedInDepot(Vehicle *v);
int ScheduleHasDepotOrders(const Order *schedule);
int CheckOrders(Vehicle *v);
+bool VehicleNeedsService(const Vehicle *v);
+
typedef struct GetNewVehiclePosResult {
int x,y;
uint old_tile;
@@ -449,7 +451,6 @@ VARDEF BackuppedOrders _backup_orders_data[1];
#define INVALID_VEHICLE 0xffff
-#define SERVICE_INTERVAL (_patches.servint_ispercent ? (v->reliability > _engines[v->engine_type].reliability * (100 - v->service_interval) / 100) : (v->date_of_last_service + v->service_interval > _date))
#define MIN_SERVINT_PERCENT 5
#define MAX_SERVINT_PERCENT 90
#define MIN_SERVINT_DAYS 30