mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r19316) -Fix (r19186): Give correct error when failing to flatten land.
This commit is contained in:
parent
4d5125f0c4
commit
f747b980c6
@ -385,7 +385,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
uint curh = TileHeight(tile);
|
||||
while (curh != h) {
|
||||
CommandCost ret = DoCommand(tile, SLOPE_N, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND);
|
||||
if (ret.Failed()) break;
|
||||
if (ret.Failed()) return (cost.GetCost() == 0) ? ret : cost;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
money -= ret.GetCost();
|
||||
|
Loading…
Reference in New Issue
Block a user