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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user