diff options
author | rubidium <rubidium@openttd.org> | 2010-08-08 19:50:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-08 19:50:07 +0000 |
commit | 747634a687abf468f9418d9bace237bf7327d9ab (patch) | |
tree | 06b3085dfd24124cceec981410b86e49d7421409 | |
parent | f072c099eef81c00f06694b962c825ed7a2bb359 (diff) | |
download | openttd-747634a687abf468f9418d9bace237bf7327d9ab.tar.xz |
(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
-rw-r--r-- | src/object_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index bfc258779..8a97ba310 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -254,7 +254,8 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags) const ObjectSpec *spec = ObjectSpec::Get(type); /* 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! */ if (_current_company != OWNER_WATER) { |