summaryrefslogtreecommitdiff
path: root/src/terraform_cmd.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-26 20:49:22 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-27 18:30:56 +0200
commiteaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9 (patch)
tree9109b1f27790ef745d32eabb9aadb420b7d1a708 /src/terraform_cmd.cpp
parent35dbd53682bd8e14fd0726480e47587b27a0d9ae (diff)
downloadopenttd-eaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9.tar.xz
Fix: part of a tile might not be marked dirty upon terraforming
Diffstat (limited to 'src/terraform_cmd.cpp')
-rw-r--r--src/terraform_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index 0a1c6e857..bc4df173d 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -310,7 +310,7 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
/* Mark affected areas dirty. */
for (TileIndexSet::const_iterator it = ts.dirty_tiles.begin(); it != ts.dirty_tiles.end(); it++) {
MarkTileDirtyByTile(*it);
- TileIndexToHeightMap::const_iterator new_height = ts.tile_to_new_height.find(tile);
+ TileIndexToHeightMap::const_iterator new_height = ts.tile_to_new_height.find(*it);
if (new_height == ts.tile_to_new_height.end()) continue;
MarkTileDirtyByTile(*it, 0, new_height->second);
}