diff options
-rw-r--r-- | src/object_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 9fc5b8ee0..17a053b3d 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -240,7 +240,8 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 if (callback == CALLBACK_FAILED) { cost.AddCost(CheckBuildableTile(t, 0, allowed_z, false)); } else if (callback != 0) { - return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); + /* The meaning of bit 10 is inverted in the result of this callback. */ + return GetErrorMessageFromLocationCallbackResult(ToggleBit(callback, 10), spec->grf_prop.grffile->grfid, STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION); } } } |