1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 17:02:37 +01:00

(svn r17493) -Codechange: store the depot index on the map

This commit is contained in:
rubidium
2009-09-10 14:33:07 +00:00
parent bb94724a09
commit 55ddce8da2
11 changed files with 45 additions and 15 deletions

View File

@@ -2730,6 +2730,8 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold)
{
switch (GetTileType(tile)) {
case MP_ROAD:
if (IsRoadDepot(tile)) return CalcClosestTownFromTile(tile, threshold);
if (!HasTownOwnedRoad(tile)) {
TownID tid = GetTownIndex(tile);