# HG changeset patch # User rubidium # Date 2009-03-12 14:23:23 # Node ID 573a18104f058d5e8e7ade92705bbdba95e44df9 # Parent 1af5419c980712173991a3e4de75256a95b8c12a (svn r15687) -Fix [FS#2723]: wrong/misleading error message when autorail builds nothing when trying to build over signals in the wrong way. diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -699,7 +699,7 @@ static CommandCost CmdRailTrackHelper(Ti 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.