summaryrefslogtreecommitdiff
path: root/src/pbs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbs.cpp')
-rw-r--r--src/pbs.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pbs.cpp b/src/pbs.cpp
index 04b956fbd..089591e9b 100644
--- a/src/pbs.cpp
+++ b/src/pbs.cpp
@@ -101,6 +101,8 @@ bool TryReserveRailTrack(TileIndex tile, Track t)
case MP_ROAD:
if (IsLevelCrossing(tile) && !GetCrossingReservation(tile)) {
SetCrossingReservation(tile, true);
+ BarCrossing(tile);
+ MarkTileDirtyByTile(tile);
return true;
}
break;
@@ -149,7 +151,10 @@ bool TryReserveRailTrack(TileIndex tile, Track t)
break;
case MP_ROAD:
- if (IsLevelCrossing(tile)) SetCrossingReservation(tile, false);
+ if (IsLevelCrossing(tile)) {
+ SetCrossingReservation(tile, false);
+ UpdateLevelCrossing(tile);
+ }
break;
case MP_STATION: