summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-12-27 12:38:02 +0000
committercelestar <celestar@openttd.org>2006-12-27 12:38:02 +0000
commitd95e2c2dd10a0dfc1704962a68a2bd32b635d158 (patch)
tree28100daed109de06e979123edd0601487ecc8261 /waypoint.c
parentd92103d6ff97ae413e2e6eae602e04b05addaf17 (diff)
downloadopenttd-d95e2c2dd10a0dfc1704962a68a2bd32b635d158.tar.xz
(svn r7573) -Merged the bridge branch. Allows to build bridges of arbitrary rail/road combinations (including signals)
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 eaf927504..e0bc48936 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"
@@ -206,6 +207,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) {