1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 08:59:09 +00:00

(svn r157) -Feature: [1009708] Percent-based service intervals. Send a vehicle to depot after it has lost X% of its reliability (mivlad)

This commit is contained in:
darkvater
2004-09-04 13:06:09 +00:00
parent b4cf633f66
commit 85628544ee
13 changed files with 104 additions and 33 deletions

View File

@@ -1549,7 +1549,7 @@ static bool ProcessTrainOrder(Vehicle *v)
}
if ((v->next_order & (OT_MASK|OF_UNLOAD|OF_FULL_LOAD)) == (OT_GOTO_DEPOT|OF_UNLOAD|OF_FULL_LOAD) &&
v->date_of_last_service+v->service_interval > _date) {
SERVICE_INTERVAL) {
v->cur_order_index++;
}
@@ -2541,7 +2541,7 @@ static void CheckIfTrainNeedsService(Vehicle *v)
if (_patches.servint_trains == 0)
return;
if (v->date_of_last_service + v->service_interval > _date)
if (SERVICE_INTERVAL)
return;
if (v->vehstatus & VS_STOPPED)