Fix c02ef3e4: [NewGRF] Variable 0x44 was always HZB_TOWN_EDGE for road stops. (#8400)

This commit is contained in:
Matt Kimber
2020-12-21 22:46:38 +00:00
committed by GitHub
parent 981c540201
commit 6c3a5b5b17

View File

@@ -45,7 +45,7 @@
const Town *t = nullptr; const Town *t = nullptr;
if (IsRoadDepotTile(this->tile)) { if (IsRoadDepotTile(this->tile)) {
t = Depot::GetByTile(this->tile)->town; t = Depot::GetByTile(this->tile)->town;
} else if (IsTileType(this->tile, MP_ROAD)) { } else {
t = ClosestTownFromTile(this->tile, UINT_MAX); t = ClosestTownFromTile(this->tile, UINT_MAX);
} }
return t != nullptr ? GetTownRadiusGroup(t, this->tile) : HZB_TOWN_EDGE; return t != nullptr ? GetTownRadiusGroup(t, this->tile) : HZB_TOWN_EDGE;