diff options
author | frosch <frosch@openttd.org> | 2011-08-27 08:41:36 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-08-27 08:41:36 +0000 |
commit | b642b4a881ef645842242d389ff90a1d8cfc7e61 (patch) | |
tree | 89129404077b303461f91084809d0ad24df51ed9 /src/vehicle.cpp | |
parent | 4c434ad775d64e1969352ff65c49b868d18c716d (diff) | |
download | openttd-b642b4a881ef645842242d389ff90a1d8cfc7e61.tar.xz |
(svn r22847) -Fix (r22816): Wagons shall not be processed by autorenew.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 4aa24f546..890ecf6bc 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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; } |