diff options
author | Darkvater <darkvater@openttd.org> | 2007-01-12 00:44:49 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2007-01-12 00:44:49 +0000 |
commit | 95deb5eace2b078ac72e2e5f6f495466f4174f93 (patch) | |
tree | ef21779e0b108f31b2a22474df82135cbe92da59 /src | |
parent | 2533b4a5206d7236fb294e609f31e8ba7a1d8877 (diff) | |
download | openttd-95deb5eace2b078ac72e2e5f6f495466f4174f93.tar.xz |
(svn r8071) -Fix (r5999): [FS#536] Merging 32bit dates broke the inauguration date of companies in
oldloader: "The year the company was inaugurated (full value, not base-1920)"
(Marcin Grzegorczyk's TTD internals site)
Diffstat (limited to 'src')
-rw-r--r-- | src/oldloader.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp index 352486444..ba5ed4228 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -724,7 +724,6 @@ static bool LoadOldIndustry(LoadgameState *ls, int num) } static PlayerID _current_player_id; -static uint16 _old_inaugurated_year; static int32 _old_yearly; static const OldChunks player_yearly_chunk[] = { @@ -939,9 +938,9 @@ static const OldChunks player_chunk[] = { OCL_CHUNK( 3, OldPlayerYearly ), OCL_CHUNK( 1, OldPlayerEconomy ), - OCL_VAR ( OC_UINT16, 1, &_old_inaugurated_year ), - OCL_SVAR( OC_TILE, Player, last_build_coordinate ), - OCL_SVAR( OC_UINT8, Player, num_valid_stat_ent ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_I32, Player, inaugurated_year), + OCL_SVAR( OC_TILE, Player, last_build_coordinate ), + OCL_SVAR( OC_UINT8, Player, num_valid_stat_ent ), OCL_CHUNK( 1, OldPlayerAI ), @@ -990,7 +989,7 @@ static bool LoadOldPlayer(LoadgameState *ls, int num) p->money64 = p->player_money = p->current_loan = 100000; _player_colors[num] = p->player_color; - p->inaugurated_year = _old_inaugurated_year; + p->inaugurated_year -= ORIGINAL_BASE_YEAR; if (p->location_of_house == 0xFFFF) p->location_of_house = 0; |