From 2cb0906c58a635712e752bedf000dc2b59b7aafd Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 15 Oct 2007 20:49:11 +0000 Subject: [PATCH] (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. --- src/oldloader.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/oldloader.cpp b/src/oldloader.cpp index fca06eed9b..0f39e26008 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();