From b8da06ddb11f234451864e0b454163ebb546e4cd Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 16 Mar 2006 15:16:27 +0000 Subject: (svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX --- train_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'train_cmd.c') 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); -- cgit v1.2.3-54-g00ecf