Change: Add path cache for ships.

This commit is contained in:
Peter Nelson
2019-01-14 23:33:42 +00:00
committed by PeterN
parent 1c725fce47
commit 81330b8d6e
12 changed files with 67 additions and 21 deletions

View File

@@ -15,6 +15,7 @@
#include "../../direction_type.h"
#include "../../track_type.h"
#include "../../vehicle_type.h"
#include "../../ship.h"
#include "../pathfinder_type.h"
/**
@@ -26,7 +27,7 @@
* @param path_found [out] Whether a path has been found (true) or has been guessed (false)
* @return the best trackdir for next turn or INVALID_TRACK if the path could not be found
*/
Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found);
Track YapfShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, ShipPathCache &path_cache);
/**
* Returns true if it is better to reverse the ship before leaving depot using YAPF.