mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 08:49:50 +00:00
(svn r22847) -Fix (r22816): Wagons shall not be processed by autorenew.
This commit is contained in:
parent
4c434ad775
commit
b642b4a881
@ -81,7 +81,9 @@ bool Vehicle::NeedsAutorenewing(const Company *c) const
|
||||
|
||||
if (!c->settings.engine_renew) return false;
|
||||
if (this->age - this->max_age < (c->settings.engine_renew_months * 30)) return false;
|
||||
if (this->age == 0) return false; // rail cars don't age and lacks a max age
|
||||
|
||||
/* Only engines need renewing */
|
||||
if (this->type == VEH_TRAIN && !Train::From(this)->IsEngine()) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user