(svn r22847) -Fix (r22816): Wagons shall not be processed by autorenew.

This commit is contained in:
frosch 2011-08-27 08:41:36 +00:00
parent 4c434ad775
commit b642b4a881
1 changed files with 3 additions and 1 deletions

View File

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