summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-06-02 13:05:41 +0000
committercelestar <celestar@openttd.org>2006-06-02 13:05:41 +0000
commit25a63ec7af6fadb2d33ef84f79597c14b10e7f39 (patch)
treed5df4e2831609eca45d7ea4558e09a600089ead2 /waypoint.c
parentd680fcec772d422b88ea4802add2e6195c6327a2 (diff)
downloadopenttd-25a63ec7af6fadb2d33ef84f79597c14b10e7f39.tar.xz
(svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above: Any railway track combination (excluding depots and waypoints) Any road combination (excluding depots) Clear tiles (duh), including fields Tunnel entrances Bridge heads Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing There are still a number of visual problems remaining, especially when electric railways are on or under the bridge. DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
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) {