(svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138)

This commit is contained in:
rubidium
2013-02-14 17:06:49 +00:00
parent c77cd1f409
commit 369a6f9d1b
10 changed files with 85 additions and 10 deletions

View File

@@ -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;