--- a/waypoint.c Wed Dec 27 12:22:25 2006 +0000
+++ b/waypoint.c Wed Dec 27 12:38:02 2006 +0000
@@ -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"
@@ -206,6 +207,8 @@
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) {