summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-10-01 19:29:31 +0000
committerfrosch <frosch@openttd.org>2012-10-01 19:29:31 +0000
commit712260202660ffaf19342b43c0b34cd2e2093434 (patch)
tree4723c95c9c4051fbbb322e5e28f9f2c50372bbc6 /src/saveload
parentd07676e03f4a923ed522d86c0f0985f4428c9969 (diff)
downloadopenttd-712260202660ffaf19342b43c0b34cd2e2093434.tar.xz
(svn r24564) -Fix [FS#5312] (r17433): Limiting the inflation did not quite work.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 8a87dcc40..d97aa2aaf 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2742,6 +2742,12 @@ bool AfterLoadGame()
FOR_ALL_COMPANIES(c) c->tree_limit = _settings_game.construction.tree_frame_burst << 16;
}
+ if (IsSavegameVersionBefore(177)) {
+ /* Fix too high inflation rates */
+ if (_economy.inflation_prices > MAX_INFLATION) _economy.inflation_prices = MAX_INFLATION;
+ if (_economy.inflation_payment > MAX_INFLATION) _economy.inflation_payment = MAX_INFLATION;
+ }
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();