Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -501,14 +501,11 @@ static void ShipArrivesAt(const Vehicle *v, Station *st)
|
||||
*
|
||||
* @param v Ship to navigate
|
||||
* @param tile Tile, the ship is about to enter
|
||||
* @param enterdir Direction of entering
|
||||
* @param tracks Available track choices on \a tile
|
||||
* @return Track to choose, or INVALID_TRACK when to reverse.
|
||||
*/
|
||||
static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
|
||||
static Track ChooseShipTrack(Ship *v, TileIndex tile, TrackBits tracks)
|
||||
{
|
||||
assert(IsValidDiagDirection(enterdir));
|
||||
|
||||
bool path_found = true;
|
||||
Track track;
|
||||
|
||||
@@ -535,7 +532,7 @@ static Track ChooseShipTrack(Ship *v, TileIndex tile, DiagDirection enterdir, Tr
|
||||
|
||||
switch (_settings_game.pf.pathfinder_for_ships) {
|
||||
case VPF_NPF: track = NPFShipChooseTrack(v, path_found); break;
|
||||
case VPF_YAPF: track = YapfShipChooseTrack(v, tile, enterdir, tracks, path_found, v->path); break;
|
||||
case VPF_YAPF: track = YapfShipChooseTrack(v, tile, path_found, v->path); break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
}
|
||||
@@ -821,7 +818,7 @@ static void ShipController(Ship *v)
|
||||
}
|
||||
|
||||
/* Choose a direction, and continue if we find one */
|
||||
const Track track = ChooseShipTrack(v, gp.new_tile, diagdir, tracks);
|
||||
const Track track = ChooseShipTrack(v, gp.new_tile, tracks);
|
||||
if (track == INVALID_TRACK) return ReverseShip(v);
|
||||
|
||||
const ShipSubcoordData &b = _ship_subcoord[diagdir][track];
|
||||
|
||||
Reference in New Issue
Block a user