summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Kimber <mattkimber@users.noreply.github.com>2020-12-21 22:46:38 +0000
committerGitHub <noreply@github.com>2020-12-21 23:46:38 +0100
commit6c3a5b5b17de97be292fc9442f6bd693973114ee (patch)
tree5aa9a9e61d4726bb2a3dd33042e3a6f87345f182 /src
parent981c5402018bbe8f8d4593faf0fbbf712c34799d (diff)
downloadopenttd-6c3a5b5b17de97be292fc9442f6bd693973114ee.tar.xz
Fix c02ef3e4: [NewGRF] Variable 0x44 was always HZB_TOWN_EDGE for road stops. (#8400)
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_roadtype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_roadtype.cpp b/src/newgrf_roadtype.cpp
index c49faa59f..3f6150cd3 100644
--- a/src/newgrf_roadtype.cpp
+++ b/src/newgrf_roadtype.cpp
@@ -45,7 +45,7 @@
const Town *t = nullptr;
if (IsRoadDepotTile(this->tile)) {
t = Depot::GetByTile(this->tile)->town;
- } else if (IsTileType(this->tile, MP_ROAD)) {
+ } else {
t = ClosestTownFromTile(this->tile, UINT_MAX);
}
return t != nullptr ? GetTownRadiusGroup(t, this->tile) : HZB_TOWN_EDGE;