From f747b980c6580e00be48e6c54d567a8470f1c01d Mon Sep 17 00:00:00 2001 From: alberth Date: Thu, 4 Mar 2010 21:35:26 +0000 Subject: (svn r19316) -Fix (r19186): Give correct error when failing to flatten land. --- src/terraform_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index ef487afc5..5bad78fdf 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -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(); -- cgit v1.2.3-70-g09d2