@@ -611,12 +611,17 @@ void SetYearEngineAgingStops()
ConvertDateToYMD(ei->base_intro + (ei->lifelength * DAYS_IN_LEAP_YEAR) / 2, &ymd);
_year_engine_aging_stops = max(_year_engine_aging_stops, ymd.year);
}
/**
* Start/initialise one engine.
* @param e The engine to initialise.
* @param aging_date The date used for age calculations.
*/
void StartupOneEngine(Engine *e, Date aging_date)
{
const EngineInfo *ei = &e->info;
e->age = 0;
e->flags = 0;
@@ -651,12 +656,13 @@ void StartupOneEngine(Engine *e, Date ag
if (!HasBit(ei->climates, _settings_game.game_creation.landscape)) {
e->flags |= ENGINE_AVAILABLE;
e->company_avail = 0;
/** Start/initialise all our engines. */
void StartupEngines()
Engine *e;
/* Aging of vehicles stops, so account for that when starting late */
const Date aging_date = min(_date, ConvertYMDToDate(_year_engine_aging_stops, 0, 1));