From 8ed58f2b94a265a44b509bfa2c4d92545191cab1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 12 Mar 2009 14:23:23 +0000 Subject: [PATCH] (svn r15687) -Fix [FS#2723]: wrong/misleading error message when autorail builds nothing when trying to build over signals in the wrong way. --- src/rail_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 1e55738819..ae7178c186 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.