summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-06-17 01:01:15 +0000
committerbelugas <belugas@openttd.org>2007-06-17 01:01:15 +0000
commit7f3c41b5bf85cd16fbfbfd6f6becad1dc27bcdd6 (patch)
treee7f483d077b03c5baf2c52e475207318bf8af29d /src
parented441c8003c6e728f5f60953e3a997f202115441 (diff)
downloadopenttd-7f3c41b5bf85cd16fbfbfd6f6becad1dc27bcdd6.tar.xz
(svn r10172) -Fix(r10127): Wrong evaluation order on variable 0x41 for industry tile.
The industry's xy (northernmost tile) should be checked against the relative tile, not the other way around.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_industrytiles.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 3ec3788bf..d7cbe350d 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -51,8 +51,8 @@ static uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, I
*/
static uint32 GetRelativePosition(TileIndex tile, TileIndex ind_tile)
{
- byte x = TileX(ind_tile) - TileX(tile);
- byte y = TileY(ind_tile) - TileY(tile);
+ byte x = TileX(tile) - TileX(ind_tile);
+ byte y = TileY(tile) - TileY(ind_tile);
return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x;
}