Mercurial > hg > openttd
changeset 11337:cb6e9438f887 draft
(svn r15687) -Fix [FS#2723]: wrong/misleading error message when autorail builds nothing when trying to build over signals in the wrong way.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 12 Mar 2009 14:23:23 +0000 |
parents | 12352f52049d |
children | 7ca8e78f1712 |
files | src/rail_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -699,7 +699,7 @@ 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.