Index: pathfinder/yapf/yapf_costrail.hpp =================================================================== --- pathfinder/yapf/yapf_costrail.hpp (revision 27324) +++ pathfinder/yapf/yapf_costrail.hpp (working copy) @@ -487,7 +487,7 @@ /* Move to the next tile/trackdir. */ tf = &tf_local; - tf_local.Init(v, Yapf().GetCompatibleRailTypes(), &Yapf().m_perf_ts_cost); + tf_local.Init(v, (RailTypes)(1 << GetTileRailType(cur.tile)), &Yapf().m_perf_ts_cost); if (!tf_local.Follow(cur.tile, cur.td)) { assert(tf_local.m_err != TrackFollower::EC_NONE); Index: pathfinder/yapf/yapf_rail.cpp =================================================================== --- pathfinder/yapf/yapf_rail.cpp (revision 27324) +++ pathfinder/yapf/yapf_rail.cpp (working copy) @@ -21,7 +21,7 @@ #include "../../safeguards.h" -#define DEBUG_YAPF_CACHE 0 +#define DEBUG_YAPF_CACHE 1 #if DEBUG_YAPF_CACHE template void DumpState(Tpf &pf1, Tpf &pf2)