Add game setting to limit train lookahead to signal aspect

In realistic braking mode when multi-aspect signalling enabled by GRF
This commit is contained in:
Jonathan G Rennison
2022-06-19 11:54:40 +01:00
parent bdd73a19a1
commit 22caac6529
13 changed files with 118 additions and 16 deletions

View File

@@ -4082,6 +4082,14 @@ bool AfterLoadGame()
_aspect_cfg_hash = 0;
}
if (!SlXvIsFeaturePresent(XSLFI_REALISTIC_TRAIN_BRAKING, 9) && _settings_game.vehicle.train_braking_model == TBM_REALISTIC) {
for (Train *t : Train::Iterate()) {
if (t->lookahead != nullptr) {
t->lookahead->lookahead_end_position = t->lookahead->reservation_end_position + 1;
}
}
}
InitializeRoadGUI();
/* This needs to be done after conversion. */