Cache whether a train may have a depot or bridge speed restriction

This commit is contained in:
Jonathan G Rennison
2019-01-19 21:22:32 +00:00
parent f4180e8714
commit e15601e12f
7 changed files with 39 additions and 12 deletions

View File

@@ -3588,6 +3588,15 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_CONSIST_SPEED_RD_FLAG)) {
Train *t;
FOR_ALL_TRAINS(t) {
if ((t->track & TRACK_BIT_WORMHOLE && !(t->vehstatus & VS_HIDDEN)) || t->track == TRACK_BIT_DEPOT) {
SetBit(t->First()->flags, VRF_CONSIST_SPEED_REDUCTION);
}
}
}
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();