diff options
author | hackykid <hackykid@openttd.org> | 2005-07-17 18:48:45 +0000 |
---|---|---|
committer | hackykid <hackykid@openttd.org> | 2005-07-17 18:48:45 +0000 |
commit | d5b305852fb1450be44a8211a24792fdd6d8903a (patch) | |
tree | 1ff7c0adfa5f0d4570301b249ad35e767f57d1b7 /rail_cmd.c | |
parent | 7238b015fa31264d3b770b1a0698c3454a5374f3 (diff) | |
download | openttd-d5b305852fb1450be44a8211a24792fdd6d8903a.tar.xz |
(svn r2621) - Fix: [pbs] When removing tracks, clear their reserved status.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 825a357e8..f665dbdc0 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -486,6 +486,10 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2) /* We remove the trackbit here. */ _m[tile].m5 &= ~trackbit; + /* Unreserve track for PBS */ + if (PBSTileReserved(tile) & trackbit) + PBSClearTrack(tile, track); + if (GetTrackBits(tile) == 0) { /* The tile has no tracks left, it is no longer a rail tile */ DoClearSquare(tile); |