From 0412040bcc6709713f3d8acfc466c03f5ddbb02f Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 5 Nov 2005 18:13:40 +0000 Subject: (svn r3140) Building/removing a waypoint could leave old PBS reservations behind. This ensures they are cleared. --- waypoint.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/waypoint.c b/waypoint.c index b115ad08d..23e1ceaad 100644 --- a/waypoint.c +++ b/waypoint.c @@ -205,7 +205,11 @@ int32 CmdBuildTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2) _m[tile].m3 |= 16; _m[tile].m4 = p1 & 0xff; } - if (reserved) PBSReserveTrack(tile, dir); + if (reserved) { + PBSReserveTrack(tile, dir); + } else { + PBSClearTrack(tile, dir); + } wp->deleted = 0; wp->xy = tile; @@ -279,7 +283,11 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove) ModifyTile(tile, MP_MAP5, 1<