summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-27 10:50:21 +0000
committerrubidium <rubidium@openttd.org>2010-08-27 10:50:21 +0000
commit8522984840f001ff53238c34b99097890231b47c (patch)
tree14ce54df43654e7010f2ae381e9739fcfe1f03f0 /src/saveload
parent8047d84aa04a65bb4c63fe44f8b01e1979246689 (diff)
downloadopenttd-8522984840f001ff53238c34b99097890231b47c.tar.xz
(svn r20634) -Fix (r20592): gracefully do the date_fract format conversion when an older OpenTTD savegame which loaded an ancient savegame still has the old date_fract "format".
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index b706fed60..388faceee 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -566,7 +566,7 @@ bool AfterLoadGame()
}
/* The value of _date_fract got divided, so make sure that old games are converted correctly. */
- if (CheckSavegameVersionOldStyle(11, 1)) _date_fract /= 885;
+ if (CheckSavegameVersionOldStyle(11, 1) || (CheckSavegameVersion(147) && _date_fract > DAY_TICKS)) _date_fract /= 885;
/* Update current year
* must be done before loading sprites as some newgrfs check it */