Improve pathfinder support for multiple docks
The pathfinder can now find docks other than the Manhattan closest one. Based on Cirdan commits: afc7969c13d7ca59afe4dae4bf88122ba8d27df2 4067190dedcd3e5f668ea4f49b1dd8dfed10b2a7 d9be6b712d2ae4fb1b5ae844dde4919dd24c4fb2
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "station_type.h"
|
||||
#include "tile_type.h"
|
||||
#include "map_func.h"
|
||||
#include "core/pool_type.hpp"
|
||||
|
||||
typedef Pool<Dock, DockID, 32, 64000> DockPool;
|
||||
@@ -31,6 +32,11 @@ struct Dock : DockPool::PoolItem<&_dock_pool> {
|
||||
|
||||
inline Dock *GetNextDock() const { return this->next; }
|
||||
|
||||
inline TileIndex GetDockingTile() const
|
||||
{
|
||||
return this->flat + TileOffsByDiagDir(DiagdirBetweenTiles(this->sloped, this->flat));
|
||||
}
|
||||
|
||||
static Dock *GetByTile(TileIndex tile);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user