Fix cost of end-of-line after a waypoint in pathfinders
commit3e363d819ecaa255cd5f3790591d54ea5a726dc3
authorcirdan <cirdansw@gmail.com>
Mon, 23 Dec 2013 17:54:44 +0000 (23 18:54 +0100)
committercirdan <cirdansw@gmail.com>
Mon, 23 Dec 2013 17:54:44 +0000 (23 18:54 +0100)
treeada383a92a5268a4a268404352af92de0505b840
parentfcbd232f3071342245438b75e50cc1567a362989
Fix cost of end-of-line after a waypoint in pathfinders

Switching to FollowNext() introduced a bug in the rail node cost
functions when end-of-line was found after a waypoint (but without
any intervening junction), because the wrong tile would be tested
for being a free waiting position. Fix this, and make the surronding
code that deals with node cost after a waypoint slightly clearer.
src/pathfinder/npf/npf.cpp
src/pathfinder/yapf/yapf_costrail.hpp