diff options
-rw-r--r-- | src/engine.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index f4737cf59..575995f86 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -643,9 +643,8 @@ void StartupOneEngine(Engine *e, Date aging_date) e->company_avail = 0; e->company_hidden = 0; - /* Don't randomise the start-date in the first two years after gamestart to ensure availability - * of engines in early starting games. - * Note: TTDP uses fixed 1922 */ + /* Vehicles with the same base_intro date shall be introduced at the same time. + * Make sure they use the same randomisation of the date. */ SavedRandomSeeds saved_seeds; SaveRandomSeeds(&saved_seeds); SetRandomSeed(_settings_game.game_creation.generation_seed ^ @@ -654,6 +653,9 @@ void StartupOneEngine(Engine *e, Date aging_date) e->GetGRFID()); uint32 r = Random(); + /* Don't randomise the start-date in the first two years after gamestart to ensure availability + * of engines in early starting games. + * Note: TTDP uses fixed 1922 */ e->intro_date = ei->base_intro <= ConvertYMDToDate(_settings_game.game_creation.starting_year + 2, 0, 1) ? ei->base_intro : (Date)GB(r, 0, 9) + ei->base_intro; if (e->intro_date <= _date) { e->age = (aging_date - e->intro_date) >> 5; |