1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-27 22:24:28 +01:00

(svn r13685) [0.6] -Backport from trunk:

- Fix: In the case that elrails and 'realistic' acceleration are disabled all electrified engines would have no power on load, until the vehicle got turned around, loaded or got into a depot [FS#2102] (r13681)
- Fix: Saving TTD imported games in recession failed due to wrong (and unneeded) type conversions in the saveload code [FS#2131] (r13679)
- Fix: Inactive companies from old (TTD) saves could be marked active in some cases, which then loads garbage in their statistics and such [FS#2126] (r13676)
- Fix: Desync when building electrified trains on a dedicated server that was started with electrification disabled [FS#2122] (r13673)
- Fix: Clear the memory for the new AI during the loading of a savegame so it does not try to execute commands generated in a different savegame, which could be resulting in the AI trying to give orders to stations that do not exist (r13505)
- Fix: Loading of very old OpenTTD savegames was broken (r13373)
This commit is contained in:
rubidium
2008-07-09 18:59:39 +00:00
parent 808f15e43f
commit 94ae5be42a
7 changed files with 30 additions and 11 deletions

View File

@@ -993,9 +993,13 @@ static bool LoadOldPlayer(LoadgameState *ls, int num)
if (!LoadChunk(ls, p, player_chunk)) return false;
if (_old_string_id == 0) {
p->is_active = false;
return true;
}
p->name_1 = RemapOldStringID(_old_string_id);
p->president_name_1 = RemapOldStringID(_old_string_id_2);
p->player_money = p->player_money;
_players_ai[_current_player_id].tick = ai_tick;
if (num == 0) {
@@ -1540,7 +1544,7 @@ static const OldChunks main_chunk[] = {
OCL_VAR ( OC_FILE_U32 | OC_VAR_I64, 1, &_economy.max_loan ),
OCL_VAR ( OC_FILE_U32 | OC_VAR_I64, 1, &_economy.max_loan_unround ),
OCL_VAR ( OC_FILE_U16 | OC_VAR_U32, 1, &_economy.fluct ),
OCL_VAR ( OC_INT16, 1, &_economy.fluct ),
OCL_VAR ( OC_UINT16, 1, &_disaster_delay ),