mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r20592) -Fix (r2041): no (proper) savegame conversion was done when _date_fract got a new value range
This commit is contained in:
parent
56a263070f
commit
29e02728e1
@ -34,6 +34,8 @@ uint16 _tick_counter; ///< Ever incrementing (and sometimes wrapping) tick coun
|
||||
*/
|
||||
void SetDate(Date date, DateFract fract)
|
||||
{
|
||||
assert(fract < DAY_TICKS);
|
||||
|
||||
YearMonthDay ymd;
|
||||
|
||||
_date = date;
|
||||
|
@ -569,6 +569,9 @@ bool AfterLoadGame()
|
||||
default: break;
|
||||
}
|
||||
|
||||
/* The value of _date_fract got divided, so make sure that old games are converted correctly. */
|
||||
if (CheckSavegameVersionOldStyle(11, 1)) _date_fract /= 885;
|
||||
|
||||
/* Update current year
|
||||
* must be done before loading sprites as some newgrfs check it */
|
||||
SetDate(_date, _date_fract);
|
||||
|
Loading…
Reference in New Issue
Block a user