summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-12 14:23:23 +0000
committerrubidium <rubidium@openttd.org>2009-03-12 14:23:23 +0000
commitab9788b290f17b9c203853d86632601d4e60698e (patch)
tree900af660e171edb1b90b2e0dd5fb8559744ed192
parent7e24f67426e66bbc6c8e847b2749f10d3a170de4 (diff)
downloadopenttd-ab9788b290f17b9c203853d86632601d4e60698e.tar.xz
(svn r15687) -Fix [FS#2723]: wrong/misleading error message when autorail builds nothing when trying to build over signals in the wrong way.
-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 1e5573881..ae7178c18 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -699,7 +699,7 @@ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint3
if (!IsDiagonalTrackdir(trackdir)) ToggleBit(trackdir, 0);
}
- return (total_cost.GetCost() == 0) ? CommandCost(remove ? INVALID_STRING_ID : STR_1007_ALREADY_BUILT) : total_cost;
+ return (total_cost.GetCost() == 0) ? CommandCost(remove ? INVALID_STRING_ID : (_error_message == INVALID_STRING_ID ? STR_1007_ALREADY_BUILT : _error_message)) : total_cost;
}
/** Build rail on a stretch of track.