Fix desync warning messages when loading game with non-matching train braking model

This commit is contained in:
Jonathan G Rennison
2021-04-14 19:56:38 +01:00
parent 686bcb8009
commit 9e3ac646fa

View File

@@ -933,6 +933,10 @@ bool AfterLoadGame()
} }
} }
if (SlXvIsFeatureMissing(XSLFI_REALISTIC_TRAIN_BRAKING)) {
_settings_game.vehicle.train_braking_model = TBM_ORIGINAL;
}
/* Update all vehicles */ /* Update all vehicles */
AfterLoadVehicles(true); AfterLoadVehicles(true);
@@ -3870,9 +3874,6 @@ bool AfterLoadGame()
UpdateAllAnimatedTileSpeeds(); UpdateAllAnimatedTileSpeeds();
} }
if (SlXvIsFeatureMissing(XSLFI_REALISTIC_TRAIN_BRAKING)) {
_settings_game.vehicle.train_braking_model = TBM_ORIGINAL;
}
if (!SlXvIsFeaturePresent(XSLFI_REALISTIC_TRAIN_BRAKING, 2)) { if (!SlXvIsFeaturePresent(XSLFI_REALISTIC_TRAIN_BRAKING, 2)) {
for (Train *t : Train::Iterate()) { for (Train *t : Train::Iterate()) {
if (!(t->vehstatus & VS_CRASHED)) { if (!(t->vehstatus & VS_CRASHED)) {