summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-14 18:45:14 +0000
committerrubidium <rubidium@openttd.org>2011-01-14 18:45:14 +0000
commitc6b46725dbf28ccfc532ebc21dd650181336a99c (patch)
treecd2581f4bb171342e90b0cb0cf0772ff20a416c8 /src
parentc58a910c8edc1df1925c5348be2aab55c3cd6cb4 (diff)
downloadopenttd-c6b46725dbf28ccfc532ebc21dd650181336a99c.tar.xz
(svn r21791) -Fix [FS#4407]: off-by-one-ish for the terraforming limit
Diffstat (limited to 'src')
-rw-r--r--src/terraform_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index fd91f4d3a..67fadf6d7 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -453,7 +453,10 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
* when it's near the terraforming limit. Even then, the estimation is
* completely off due to it basically counting terraforming double, so it being
* cut off earlier might even give a better estimate in some cases. */
- if (--limit <= 0) break;
+ if (--limit <= 0) {
+ had_success = true;
+ break;
+ }
}
cost.AddCost(ret);