summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'waypoint.c')
-rw-r--r--waypoint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/waypoint.c b/waypoint.c
index 7d4efd0a1..519abedfb 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -9,6 +9,7 @@
#include "map.h"
#include "order.h"
#include "rail_map.h"
+#include "bridge_map.h"
#include "saveload.h"
#include "station.h"
#include "tile.h"
@@ -201,6 +202,8 @@ int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return_cmd_error(STR_0007_FLAT_LAND_REQUIRED);
}
+ if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST);
+
/* Check if there is an already existing, deleted, waypoint close to us that we can reuse. */
wp = FindDeletedWaypointCloseTo(tile);
if (wp == NULL) {