(svn r18383) -Fix (r18375): triggering NOT_REACHED for some waypoints

This commit is contained in:
rubidium
2009-12-02 18:12:24 +00:00
parent 2f640cb195
commit b7b540c169
3 changed files with 5 additions and 4 deletions

View File

@@ -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;