summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-01-19 18:33:20 +0000
committerpeter1138 <peter1138@openttd.org>2006-01-19 18:33:20 +0000
commit4f394f6a636c9bbba637efe2e53c3e6b329bdf8f (patch)
tree9f4a1562de54533da800c670fc64a2272f33641c
parentc56ae910f0487391b0a8ef9f32356795bee88ec9 (diff)
downloadopenttd-4f394f6a636c9bbba637efe2e53c3e6b329bdf8f.tar.xz
(svn r3410) - NewGRF fix: Only add a random number of days to an engine's base introduction date if that date is not 0.
-rw-r--r--engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine.c b/engine.c
index 56693a00c..b845934a7 100644
--- a/engine.c
+++ b/engine.c
@@ -210,7 +210,7 @@ void StartupEngines(void)
e->player_avail = 0;
r = Random();
- e->intro_date = GB(r, 0, 9) + ei->base_intro;
+ e->intro_date = ei->base_intro == 0 ? 0 : GB(r, 0, 9) + ei->base_intro;
if (e->intro_date <= _date) {
e->age = (_date - e->intro_date) >> 5;
e->player_avail = (byte)-1;