summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-01-08 11:45:08 +0000
committerfrosch <frosch@openttd.org>2017-01-08 11:45:08 +0000
commit1446d916f0bae30081fc761dc81fc16b188f3906 (patch)
tree347b40988bde0a107b09510e768d12c9ca2eb209 /src
parenta3b356e05782f8b53ef2e3a645eccd33a8c87c23 (diff)
downloadopenttd-1446d916f0bae30081fc761dc81fc16b188f3906.tar.xz
(svn r27726) -Fix: Improve error message when trying to build rail track over a depot. (adf88)
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index a8c20e339..a5face14c 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -455,7 +455,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
CommandCost ret = CheckTileOwnership(tile);
if (ret.Failed()) return ret;
- if (!IsPlainRail(tile)) return CMD_ERROR;
+ if (!IsPlainRail(tile)) return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); // just get appropriate error message
if (!IsCompatibleRail(GetRailType(tile), railtype)) return_cmd_error(STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION);