1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 20:54:08 +01:00

(svn r4894) - Backport from trunk (r4750):

Trains could enter certain sloped rail tiles under bridges with incompatible rail type
This commit is contained in:
Darkvater
2006-05-16 22:11:15 +00:00
parent d27bedce36
commit 0f012198c4

View File

@@ -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;