From 93f003919f2c99a74b529eefd56fa13dfea5c975 Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 13 Oct 2005 14:44:03 +0000 Subject: (svn r3036) Use IsCompatibleRail() to check the rail type of level crossings (not a fix, because the old == method works so far) --- train_cmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index 43c67132c..d01bfb767 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2465,8 +2465,10 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile) case MP_STREET: // tracks over roads, do owner check of tracks return - IsTileOwner(tile, v->owner) && - (v->subtype != TS_Front_Engine || GB(_m[tile].m4, 0, 4) == v->u.rail.railtype); + IsTileOwner(tile, v->owner) && ( + v->subtype != TS_Front_Engine || + IsCompatibleRail(v->u.rail.railtype, GB(_m[tile].m4, 0, 4)) + ); default: return true; -- cgit v1.2.3-54-g00ecf