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:
@@ -313,6 +313,14 @@ Rect Station::GetCatchmentRectUsingRadius(uint catchment_radius) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Station::IsDockingTile(TileIndex tile) const
|
||||
{
|
||||
for (const Dock *d = this->docks; d != NULL; d = d->next) {
|
||||
if (tile == d->GetDockingTile()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Rect and pointer to IndustryVector */
|
||||
struct RectAndIndustryVector {
|
||||
Rect rect; ///< The rectangle to search the industries in.
|
||||
|
Reference in New Issue
Block a user