(svn r13681) -Revert (r13678, r13677): the fixes didn't work in all cases (assertions on savegame loads).

-Fix [FS#2102]: but now in a hopefully beter way.
This commit is contained in:
rubidium
2008-07-08 15:10:23 +00:00
parent 0984d10d9f
commit 91a27d6441
4 changed files with 16 additions and 20 deletions

View File

@@ -495,10 +495,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);