mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r12108) -Fix [FS#1753]: X/Y axis swap for station tiles in GetNearbyTile() was wrong way around.
This commit is contained in:
parent
c21787238c
commit
0f3a5fc99d
@ -294,7 +294,7 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile)
|
|||||||
if (y >= 8) y -= 16;
|
if (y >= 8) y -= 16;
|
||||||
|
|
||||||
/* Swap width and height depending on axis for railway stations */
|
/* 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 */
|
/* Make sure we never roam outside of the map */
|
||||||
return TILE_MASK(tile + TileDiffXY(x, y));
|
return TILE_MASK(tile + TileDiffXY(x, y));
|
||||||
|
Loading…
Reference in New Issue
Block a user