* Check if a level crossing should be barred. * @param tile The tile to check. * @return True if the crossing should be barred, else false. */
| 1754 | * @return True if the crossing should be barred, else false. |
| 1755 | */ |
| 1756 | static inline bool CheckLevelCrossing(TileIndex tile) |
| 1757 | { |
| 1758 | /* reserved || train on crossing || train approaching crossing */ |
| 1759 | return HasCrossingReservation(tile) || TrainOnCrossing(tile) || TrainApproachingCrossing(tile); |
| 1760 | } |
| 1761 | |
| 1762 | /** |
| 1763 | * Sets a level crossing tile to the correct state. |
no test coverage detected