summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_destrail.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-02 18:12:24 +0000
committerrubidium <rubidium@openttd.org>2009-12-02 18:12:24 +0000
commit66da3cbb20bcaf29ed3b863c25b291527b56d44a (patch)
treeaca11abc42ffcc2d03407da8a96afa52e3d66211 /src/pathfinder/yapf/yapf_destrail.hpp
parent4ec4fdff36e96321773a2a087784e9fd4ec4105d (diff)
downloadopenttd-66da3cbb20bcaf29ed3b863c25b291527b56d44a.tar.xz
(svn r18383) -Fix (r18375): triggering NOT_REACHED for some waypoints
Diffstat (limited to 'src/pathfinder/yapf/yapf_destrail.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_destrail.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp
index 7953baf25..da360b474 100644
--- a/src/pathfinder/yapf/yapf_destrail.hpp
+++ b/src/pathfinder/yapf/yapf_destrail.hpp
@@ -137,7 +137,7 @@ public:
switch (v->current_order.GetType()) {
case OT_GOTO_STATION:
case OT_GOTO_WAYPOINT:
- m_destTile = CalcClosestStationTile(v->current_order.GetDestination(), v->tile, STATION_RAIL);
+ m_destTile = CalcClosestStationTile(v->current_order.GetDestination(), v->tile, v->current_order.IsType(OT_GOTO_STATION) ? STATION_RAIL : STATION_WAYPOINT);
m_dest_station_id = v->current_order.GetDestination();
m_destTrackdirs = INVALID_TRACKDIR_BIT;
break;