(svn r4349) Remove GetCrossingTransportType(), it's slightly overkill

This commit is contained in:
tron
2006-04-10 20:46:37 +00:00
parent f4a8818dbf
commit b0ee09fd1d
2 changed files with 3 additions and 21 deletions

4
npf.c
View File

@@ -467,8 +467,10 @@ static bool VehicleMayEnterTile(Owner owner, TileIndex tile, DiagDirection enter
switch (GetTileType(tile)) {
case MP_STREET:
/* rail-road crossing : are we looking at the railway part? */
if (IsLevelCrossing(tile) && GetCrossingTransportType(tile, TrackdirToTrack(DiagdirToDiagTrackdir(enterdir))) == TRANSPORT_RAIL)
if (IsLevelCrossing(tile) &&
DiagDirToAxis(enterdir) != GetCrossingRoadAxis(tile)) {
return IsTileOwner(tile, owner); /* Railway needs owner check, while the street is public */
}
break;
case MP_TUNNELBRIDGE: