(svn r20417) -Fix (r20345) [FS#4018]: the offset stored for objects shouldn't be substracted immediately from the TileIndex as that doesn't quite do the right thing
This commit is contained in:
@@ -254,7 +254,8 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
|
|||||||
const ObjectSpec *spec = ObjectSpec::Get(type);
|
const ObjectSpec *spec = ObjectSpec::Get(type);
|
||||||
|
|
||||||
/* Get to the northern most tile. */
|
/* Get to the northern most tile. */
|
||||||
tile -= GetObjectOffset(tile);
|
byte tile_offset = GetObjectOffset(tile);
|
||||||
|
tile -= TileXY(GB(tile_offset, 0, 4), GB(tile_offset, 4, 4));
|
||||||
|
|
||||||
/* Water can remove everything! */
|
/* Water can remove everything! */
|
||||||
if (_current_company != OWNER_WATER) {
|
if (_current_company != OWNER_WATER) {
|
||||||
|
Reference in New Issue
Block a user