Validate lookahead reservation end OK before calling FollowTrainReservation

This commit is contained in:
Jonathan G Rennison
2021-04-01 00:36:13 +01:00
parent 5b5e068e52
commit 8fd4f65a85
3 changed files with 40 additions and 6 deletions

View File

@@ -141,6 +141,7 @@ enum FollowTrainReservationFlags {
};
DECLARE_ENUM_AS_BIT_SET(FollowTrainReservationFlags)
bool ValidateLookAhead(const Train *v);
PBSTileInfo FollowTrainReservation(const Train *v, Vehicle **train_on_res = nullptr, FollowTrainReservationFlags flags = FTRF_NONE);
void ApplyAvailableFreeTunnelBridgeTiles(TrainReservationLookAhead *lookahead, int free_tiles, TileIndex tile, TileIndex end);
void TryCreateLookAheadForTrainInTunnelBridge(Train *t);