From d37639ac3eab8c7d8deb37ff9b7784f57aa580d4 Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 13 Oct 2005 14:44:03 +0000 Subject: [PATCH] (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(-) diff --git a/train_cmd.c b/train_cmd.c index 43c67132c2..d01bfb7678 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;