summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-10-15 20:49:11 +0000
committerrubidium <rubidium@openttd.org>2007-10-15 20:49:11 +0000
commit31bf6876d3fea34e7c8a57910b1815e92941716b (patch)
treef8c7982ae39d37a6a4a65c83959d10d6ec53289f /src
parentf4f47451ac815dd14883ff4365ef13f3b363b24f (diff)
downloadopenttd-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.
Diffstat (limited to 'src')
-rw-r--r--src/oldloader.cpp10
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();