diff options
author | rubidium <rubidium@openttd.org> | 2013-02-14 17:06:49 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-02-14 17:06:49 +0000 |
commit | 369a6f9d1b6856eee47df08b1aae8049eaf4b2fa (patch) | |
tree | ac8fea57b2d4156c4c1a7e9ca361bde23c56d99c /src/vehicle.cpp | |
parent | c77cd1f409698a5c3c0dc89f2cd1930b20b90554 (diff) | |
download | openttd-369a6f9d1b6856eee47df08b1aae8049eaf4b2fa.tar.xz |
(svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138)
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 6c542b91e..2f11421d6 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -111,7 +111,7 @@ bool Vehicle::NeedsServicing() const /* Are we ready for the next service cycle? */ const Company *c = Company::Get(this->owner); - if (c->settings.vehicle.servint_ispercent ? + if (this->ServiceIntervalIsPercent() ? (this->reliability >= this->GetEngine()->reliability * (100 - this->GetServiceInterval()) / 100) : (this->date_of_last_service + this->GetServiceInterval() >= _date)) { return false; |