mirror of https://github.com/OpenTTD/OpenTTD
(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.release/0.6
parent
03c1ecb17a
commit
0b2b435c44
|
@ -51,8 +51,8 @@ static uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, I
|
||||||
*/
|
*/
|
||||||
static uint32 GetRelativePosition(TileIndex tile, TileIndex ind_tile)
|
static uint32 GetRelativePosition(TileIndex tile, TileIndex ind_tile)
|
||||||
{
|
{
|
||||||
byte x = TileX(ind_tile) - TileX(tile);
|
byte x = TileX(tile) - TileX(ind_tile);
|
||||||
byte y = TileY(ind_tile) - TileY(tile);
|
byte y = TileY(tile) - TileY(ind_tile);
|
||||||
|
|
||||||
return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x;
|
return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue