diff options
author | frosch <frosch@openttd.org> | 2009-07-23 18:45:53 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-07-23 18:45:53 +0000 |
commit | 20c1e42be128c915087b0ecf081b3101bcec234e (patch) | |
tree | 236c7c9d2d6e0422a2a1a8b68d10e52fb9f989c3 /src | |
parent | fb47193e657227b891d5bb43b7160c14eba129c7 (diff) | |
download | openttd-20c1e42be128c915087b0ecf081b3101bcec234e.tar.xz |
(svn r16929) -Change: There is no point in not randomising engine introduction-date before 1922. Instead disable the randomisation for the first two years after game-start, so you do not have to wait for the first engine.
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index ee7077af6..6d1050354 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -492,11 +492,11 @@ void StartupOneEngine(Engine *e, Date aging_date) e->flags = 0; e->company_avail = 0; - /* The magic value of 729 days below comes from the NewGRF spec. If the - * base intro date is before 1922 then the random number of days is not - * added. */ + /* 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 */ r = Random(); - e->intro_date = ei->base_intro <= ConvertYMDToDate(1922, 0, 1) ? ei->base_intro : (Date)GB(r, 0, 9) + ei->base_intro; + 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; e->company_avail = (CompanyMask)-1; |