summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-02-11 11:21:29 +0000
committerpeter1138 <peter1138@openttd.org>2008-02-11 11:21:29 +0000
commit0f3a5fc99d58c511fa4c6023d0a825a2f5a884ca (patch)
tree46f037e240eb9484fc8c1efd01f3405f39beebe9 /src/newgrf_commons.cpp
parentc21787238cd8f4aed1e7b878bcfc5bf69cc1c339 (diff)
downloadopenttd-0f3a5fc99d58c511fa4c6023d0a825a2f5a884ca.tar.xz
(svn r12108) -Fix [FS#1753]: X/Y axis swap for station tiles in GetNearbyTile() was wrong way around.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r--src/newgrf_commons.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 59d0b06f1..6bb2612d9 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -294,7 +294,7 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile)
if (y >= 8) y -= 16;
/* Swap width and height depending on axis for railway stations */
- if (IsRailwayStationTile(tile) && GetRailStationAxis(tile) == AXIS_X) Swap(x, y);
+ if (IsRailwayStationTile(tile) && GetRailStationAxis(tile) == AXIS_Y) Swap(x, y);
/* Make sure we never roam outside of the map */
return TILE_MASK(tile + TileDiffXY(x, y));