(svn r5913) -Fix (r5906): GetVehicleOutOfTunnelTile did assert when the vehicles tile location is the exit of the tunnel.

pull/155/head
rubidium 18 years ago
parent 622fbe01e9
commit 33c1b6866c

@ -1438,13 +1438,13 @@ TileIndex GetVehicleOutOfTunnelTile(const Vehicle *v)
byte z = v->z_pos;
dir = ReverseDiagDir(dir);
do {
tile += delta;
} while (
while (
!IsTunnelTile(tile) ||
GetTunnelDirection(tile) != dir ||
GetTileZ(tile) != z
);
) {
tile += delta;
}
return tile;
}

Loading…
Cancel
Save