Fix: Try all possible reverse directions when a ship reaches a dead end

This commit is contained in:
glx22
2021-10-05 17:58:19 +02:00
committed by Loïc Guilloux
parent 207cf7bbdd
commit cbe00ec651
5 changed files with 49 additions and 15 deletions

View File

@@ -31,9 +31,10 @@ Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir,
/**
* Returns true if it is better to reverse the ship before leaving depot using YAPF.
* @param v the ship leaving the depot
* @param trackdir [out] the best of all possible reversed trackdirs
* @return true if reversing is better
*/
bool YapfShipCheckReverse(const Ship *v);
bool YapfShipCheckReverse(const Ship *v, Trackdir *trackdir);
/**
* Finds the best path for given road vehicle using YAPF.