# HG changeset patch # User peter1138 # Date 1138088488 0 # Node ID 905a06cc99c33dc26798cada860a08eb6addfc42 # Parent 30c79e6e1c3e9bd29cde4f4b03638d77b78ad951 (svn r3423) - NewGRF: Update the base_intro age at which an engine will have a randomized intro date, as per (the now updated) spec. diff -r 30c79e6e1c3e -r 905a06cc99c3 engine.c --- a/engine.c Mon Jan 23 21:05:05 2006 +0000 +++ b/engine.c Tue Jan 24 07:41:28 2006 +0000 @@ -209,8 +209,11 @@ e->flags = 0; e->player_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. r = Random(); - e->intro_date = ei->base_intro == 0 ? 0 : GB(r, 0, 9) + ei->base_intro; + e->intro_date = ei->base_intro <= 729 ? ei->base_intro : GB(r, 0, 9) + ei->base_intro; if (e->intro_date <= _date) { e->age = (_date - e->intro_date) >> 5; e->player_avail = (byte)-1;