From edbe969d239c45909ce557e1a81ce9be9ed89664 Mon Sep 17 00:00:00 2001 From: hackykid Date: Sun, 17 Jul 2005 18:48:45 +0000 Subject: [PATCH] (svn r2621) - Fix: [pbs] When removing tracks, clear their reserved status. --- rail_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rail_cmd.c b/rail_cmd.c index 825a357e8b..f665dbdc09 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);