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 | 31bf6876d3fea34e7c8a57910b1815e92941716b (patch) | |
tree | f8c7982ae39d37a6a4a65c83959d10d6ec53289f | |
parent | f4f47451ac815dd14883ff4365ef13f3b363b24f (diff) | |
download | openttd-31bf6876d3fea34e7c8a57910b1815e92941716b.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.
-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(); |