(svn r16940) -Codechange: make the pathfinders behave the same when finding waypoints or stations, i.e. don't force exactly one destination tile for a waypoint
This commit is contained in:
@@ -129,17 +129,12 @@ public:
|
||||
{
|
||||
switch (v->current_order.GetType()) {
|
||||
case OT_GOTO_STATION:
|
||||
case OT_GOTO_WAYPOINT:
|
||||
m_destTile = CalcClosestStationTile(v->current_order.GetDestination(), v->tile);
|
||||
m_dest_station_id = v->current_order.GetDestination();
|
||||
m_destTrackdirs = INVALID_TRACKDIR_BIT;
|
||||
break;
|
||||
|
||||
case OT_GOTO_WAYPOINT:
|
||||
m_destTile = Waypoint::Get(v->current_order.GetDestination())->xy;
|
||||
m_dest_station_id = INVALID_STATION;
|
||||
m_destTrackdirs = IsRailWaypointTile(m_destTile) ? TrackToTrackdirBits(GetRailStationTrack(m_destTile)) : INVALID_TRACKDIR_BIT;
|
||||
break;
|
||||
|
||||
default:
|
||||
m_destTile = v->dest_tile;
|
||||
m_dest_station_id = INVALID_STATION;
|
||||
@@ -160,7 +155,7 @@ public:
|
||||
{
|
||||
bool bDest;
|
||||
if (m_dest_station_id != INVALID_STATION) {
|
||||
bDest = IsRailStationTile(tile)
|
||||
bDest = HasStationTileRail(tile)
|
||||
&& (GetStationIndex(tile) == m_dest_station_id)
|
||||
&& (GetRailStationTrack(tile) == TrackdirToTrack(td));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user