# HG changeset patch # User tron # Date 2006-05-06 14:32:16 # Node ID de1f3e0c14e587eb77ea4a73cd59909158e48e15 # Parent 9037288897d1ea37cabf5f943d8a9e273cc148c9 (svn r4750) -Fix: Trains could enter certain sloped rail tiles under bridges with incompatible rail type diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -2627,9 +2627,9 @@ static bool CheckCompatibleRail(const Ve Slope tileh = GetTileSlope(tile, &height); // correct Z position of a train going under a bridge on slopes - if (CorrectZ(tileh)) height += TILE_HEIGHT; - - if (v->z_pos != height) return true; // train is going over bridge + if (tileh != SLOPE_FLAT) height += TILE_HEIGHT; + + if (v->z_pos > height) return true; // train is going over bridge } break;