diff options
author | rubidium <rubidium@openttd.org> | 2007-10-15 20:49:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-15 20:49:11 +0000 |
commit | 2cb0906c58a635712e752bedf000dc2b59b7aafd (patch) | |
tree | f8c7982ae39d37a6a4a65c83959d10d6ec53289f /src | |
parent | d63262ddb925b22a2c3f2763a691e0b8e2b1a210 (diff) | |
download | openttd-2cb0906c58a635712e752bedf000dc2b59b7aafd.tar.xz |
(svn r11271) -Fix [FS#1333]: some (very) old games (TTD original scenarios for example) would give a new vehicle spree, even though the vehicles were introduced decades ago.
Diffstat (limited to 'src')
-rw-r--r-- | src/oldloader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp index fca06eed9..0f39e2600 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -1617,6 +1617,16 @@ static bool LoadOldMain(LoadgameState *ls) } } + /* Make sure the available engines are really available, otherwise + * we will get a "new vehicle"-spree. */ + for (Engine *e = _engines; e != endof(_engines); e++) { + if (_date >= (e->intro_date + 365)) { + e->flags = (e->flags & ~ENGINE_EXCLUSIVE_PREVIEW) | ENGINE_AVAILABLE; + AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type); + e->player_avail = (byte)-1; + } + } + /* Fix the game to be compatible with OpenTTD */ FixOldTowns(); FixOldStations(); |