(svn r11760) -Codechange: unify the way how other end of a tunnel/bridge is determined at some places

-Fix: adding road/tram to tram/road bridge was cheaper by one tile
This commit is contained in:
smatz
2008-01-04 19:45:29 +00:00
parent 9299f76af4
commit 7302d8c88b
6 changed files with 27 additions and 21 deletions

View File

@@ -538,7 +538,7 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
/* This is a tunnel/bridge. We know this tunnel/bridge is our type,
* otherwise we wouldn't have got here. It is also facing us,
* so we should skip it's body */
dst_tile = IsTunnel(src_tile) ? GetOtherTunnelEnd(src_tile) : GetOtherBridgeEnd(src_tile);
dst_tile = GetOtherTunnelBridgeEnd(src_tile);
override_dst_check = true;
} else if (type != TRANSPORT_WATER && (IsStandardRoadStopTile(src_tile) || IsTileDepotType(src_tile, type))) {
/* This is a road station (non drive-through) or a train or road depot. We can enter and exit