summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-04-08 15:48:32 +0000
committerfrosch <frosch@openttd.org>2008-04-08 15:48:32 +0000
commitb91781b715272c0248b766d4e92da812a3c203ee (patch)
treeaa0aa02603f911329fcc1e70972dd58ae153c69a /src/train_cmd.cpp
parent4267797cc8f7ee669122c22efeb5a6014644689f (diff)
downloadopenttd-b91781b715272c0248b766d4e92da812a3c203ee.tar.xz
(svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 0447d711c..72a0e1784 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3543,7 +3543,7 @@ static void CheckIfTrainNeedsService(Vehicle *v)
{
static const uint MAX_ACCEPTABLE_DEPOT_DIST = 16;
- if (_patches.servint_trains == 0 || !VehicleNeedsService(v)) return;
+ if (_patches.servint_trains == 0 || !v->NeedsAutomaticServicing()) return;
if (v->IsInDepot()) {
VehicleServiceInDepot(v);
return;