1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 21:54:22 +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

@@ -502,10 +502,13 @@ int32 SettingsDisableElrail(int32 p1)
}
}
/* setup total power for trains */
/* Fix the total power and acceleration for trains */
FOR_ALL_VEHICLES(v) {
/* power is cached only for front engines */
if (v->type == VEH_TRAIN && IsFrontEngine(v)) TrainPowerChanged(v);
/* power and acceleration is cached only for front engines */
if (v->type == VEH_TRAIN && IsFrontEngine(v)) {
TrainPowerChanged(v);
UpdateTrainAcceleration(v);
}
}
FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index);