From cc82b15f2a808ac8ae1eae11136303c9fdabe1f7 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 16 Nov 2011 20:39:30 +0000 Subject: [PATCH] (svn r23236) -Fix (r23141): Construction of objects was always rejected. --- src/object_cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index d2d872e4c5..b44eebaff5 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -247,7 +247,8 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 } else { /* The meaning of bit 10 is inverted for a grf version < 8. */ if (spec->grf_prop.grffile->grf_version < 8) ToggleBit(callback, 10); - return GetErrorMessageFromLocationCallbackResult(callback, spec->grf_prop.grffile->grfid, STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); + CommandCost ret = GetErrorMessageFromLocationCallbackResult(callback, spec->grf_prop.grffile->grfid, STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); + if (ret.Failed()) return ret; } }