(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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user