Index: src/engine.cpp =================================================================== --- src/engine.cpp (revision 14659) +++ src/engine.cpp (working copy) @@ -72,6 +72,8 @@ if (base >= _engine_counts[type]) { /* Mark engine as valid anyway */ this->info.climates = 0x80; + /* Set model life to maximum to make wagons available */ + this->info.base_life = 0xFF; return; } @@ -86,6 +88,10 @@ this->u.rail = _orig_rail_vehicle_info[base]; this->image_index = this->u.rail.image_index; this->info.string_id = STR_8000_KIRBY_PAUL_TANK_STEAM + base; + + /* Set the default model life of wagons to the maximum (usually infinite) */ + if (this->type == VEH_TRAIN && this->u.rail.railveh_type == RAILVEH_WAGON) this->info.base_life = 0xff; + break; case VEH_ROAD: @@ -264,11 +270,7 @@ e->reliability_spd_dec = ei->decay_speed << 2; - if (IsWagon(e->index)) { - e->age = 0xFFFF; - } else { - CalcEngineReliability(e); - } + CalcEngineReliability(e); e->lifelength = ei->lifelength + _settings_game.vehicle.extend_vehicle_life; @@ -451,7 +453,7 @@ Engine *e; FOR_ALL_ENGINES(e) { /* Age the vehicle */ - if (e->flags & ENGINE_AVAILABLE && e->age != 0xFFFF) { + if (e->flags & ENGINE_AVAILABLE) { e->age++; CalcEngineReliability(e); }