mirror of https://github.com/OpenTTD/OpenTTD
(svn r4750) -Fix: Trains could enter certain sloped rail tiles under bridges with incompatible rail type
parent
e63634d332
commit
79935130eb
|
@ -2627,9 +2627,9 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile)
|
||||||
Slope tileh = GetTileSlope(tile, &height);
|
Slope tileh = GetTileSlope(tile, &height);
|
||||||
|
|
||||||
// correct Z position of a train going under a bridge on slopes
|
// correct Z position of a train going under a bridge on slopes
|
||||||
if (CorrectZ(tileh)) height += TILE_HEIGHT;
|
if (tileh != SLOPE_FLAT) 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;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue