From b642b4a881ef645842242d389ff90a1d8cfc7e61 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 27 Aug 2011 08:41:36 +0000 Subject: (svn r22847) -Fix (r22816): Wagons shall not be processed by autorenew. --- src/vehicle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2