Mercurial > hg > openttd
changeset 15946:4454933bb6ad draft
(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".
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 27 Aug 2010 10:50:21 +0000 |
parents | 13de7717e398 |
children | bc4dc3a47c50 |
files | src/saveload/afterload.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -566,7 +566,7 @@ } /* 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 */