From 0f012198c4fd127174bb81f2c147d1f1f690a093 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 16 May 2006 22:11:15 +0000 Subject: [PATCH] (svn r4894) - Backport from trunk (r4750): Trains could enter certain sloped rail tiles under bridges with incompatible rail type --- train_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train_cmd.c b/train_cmd.c index 08dcd162f3..15da398eb0 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2580,9 +2580,9 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile) uint tileh = GetTileSlope(tile, &height); // correct Z position of a train going under a bridge on slopes - if (CorrectZ(tileh)) height += 8; + if (tileh != 0) height += TILE_HEIGHT; - if (v->z_pos != height) return true; // train is going over bridge + if (v->z_pos > height) return true; // train is going over bridge } break;