summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-03 12:07:55 +0000
committerrubidium <rubidium@openttd.org>2010-08-03 12:07:55 +0000
commit1c86321d3526b70deecb5ea04eb3c878ed37808e (patch)
tree44730fdcfccb18fbfb2a108311621357b7899c3a /src/tunnelbridge_cmd.cpp
parentd687b49a4e45590c4adf24367d3be45c2b091943 (diff)
downloadopenttd-1c86321d3526b70deecb5ea04eb3c878ed37808e.tar.xz
(svn r20340) -Codechange: introduce some flags for objects and use them in some places
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 29e178bc9..0437e9ea5 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -16,7 +16,7 @@
#include "stdafx.h"
#include "rail_map.h"
#include "landscape.h"
-#include "unmovable_map.h"
+#include "unmovable.h"
#include "viewport_func.h"
#include "cmd_helper.h"
#include "command_func.h"
@@ -395,9 +395,11 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
if (z_start < GetBridgeHeight(tile)) goto not_valid_below;
break;
- case MP_UNMOVABLE:
- if (!IsOwnedLand(tile)) goto not_valid_below;
+ case MP_UNMOVABLE: {
+ const UnmovableSpec *spec = UnmovableSpec::GetByTile(tile);
+ if ((spec->flags & OBJECT_FLAG_ALLOW_UNDER_BRIDGE) == 0) goto not_valid_below;
break;
+ }
case MP_CLEAR:
break;