--- a/src/yapf/yapf_costrail.hpp Thu Jan 11 13:41:16 2007 +0000
+++ b/src/yapf/yapf_costrail.hpp Mon Jan 15 20:14:06 2007 +0000
@@ -195,9 +195,7 @@
Trackdir trackdir = n.m_key.m_td;
TileType tile_type = GetTileType(tile);
- DEBUG(yapf, 3, "PfCalcCost(Node:tile=%04X td=%s; Parent:tile=%04X td=%s)", tile, GetTrackdirName(trackdir), prev_tile, GetTrackdirName(prev_trackdir));
-
- RailType rail_type = GetTileRailType(tile, trackdir);
+ RailType rail_type = GetTileRailType(tile, TrackdirToTrack(trackdir));
// detect exit from bridge wormhole
Trackdir intermediate_trackdir = INVALID_TRACKDIR;
@@ -286,7 +284,7 @@
// if rail type changes, finish segment (cached segment can't contain more rail types)
{
- RailType new_rail_type = GetTileRailType(F.m_new_tile, (Trackdir)FindFirstBit2x64(F.m_new_td_bits));
+ RailType new_rail_type = GetTileRailType(F.m_new_tile, TrackdirToTrack(FindFirstTrackdir(F.m_new_td_bits)));
if (new_rail_type != rail_type) {
DEBUG(yapf, 4, " end: rail type changes");
break;