diff -r 4c9d49e5589a src/engine.cpp --- a/src/engine.cpp Mon Dec 08 16:29:36 2008 +0000 +++ b/src/engine.cpp Tue Dec 09 23:27:50 2008 +0100 @@ -72,6 +72,8 @@ Engine::Engine(VehicleType type, EngineI 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 @@ Engine::Engine(VehicleType type, EngineI 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,7 +270,7 @@ void StartupEngines() e->reliability_spd_dec = ei->decay_speed << 2; - if (IsWagon(e->index)) { + if (IsWagon(e->index) && ei->base_life == 0xff) { e->age = 0xFFFF; } else { CalcEngineReliability(e);