summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-16 15:16:27 +0000
committertron <tron@openttd.org>2006-03-16 15:16:27 +0000
commitb8da06ddb11f234451864e0b454163ebb546e4cd (patch)
tree79a0e9518fd43cbe914bddcaebf4983201598bc8 /train_cmd.c
parentd6134455a5aaa7b247545886be573a555cdfc2be (diff)
downloadopenttd-b8da06ddb11f234451864e0b454163ebb546e4cd.tar.xz
(svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 8b0176a0b..959291878 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -2,6 +2,7 @@
#include "stdafx.h"
#include "openttd.h"
+#include "bridge_map.h"
#include "debug.h"
#include "functions.h"
#include "gui.h"
@@ -2545,7 +2546,7 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile)
break;
case MP_TUNNELBRIDGE:
- if ((_m[tile].m5 & 0xC0) == 0xC0) { // is bridge middle part?
+ if (IsBridge(tile) && IsBridgeMiddle(tile)) {
uint height;
uint tileh = GetTileSlope(tile, &height);