1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 01:49:10 +00:00

(svn r19190) -Add: Improve error message with track building when signals are in the way.

This commit is contained in:
alberth
2010-02-21 20:55:31 +00:00
parent 2b07389fe6
commit 5052777d0b
2 changed files with 4 additions and 1 deletions

View File

@@ -197,7 +197,9 @@ static CommandCost CheckTrackCombination(TileIndex tile, TrackBits to_build, uin
if ((flags & DC_NO_RAIL_OVERLAP) || HasSignals(tile)) {
/* If we are not allowed to overlap (flag is on for ai companies or we have
* signals on the tile), check that */
if (future != TRACK_BIT_HORZ && future != TRACK_BIT_VERT) return_cmd_error(STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION);
if (future != TRACK_BIT_HORZ && future != TRACK_BIT_VERT) {
return_cmd_error((flags & DC_NO_RAIL_OVERLAP) ? STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION : STR_ERROR_MUST_REMOVE_SIGNALS_FIRST);
}
}
/* Normally, we may overlap and any combination is valid */
return CommandCost();