diff options
author | Darkvater <darkvater@openttd.org> | 2006-11-10 19:04:27 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-11-10 19:04:27 +0000 |
commit | 0d9f80839f80edf41bd8ed75806b7901a553785a (patch) | |
tree | 0e31c8db2adecc29b9863fc789500430976ff240 | |
parent | d0e0b78a3264f888ed5995ba9ca4a8bf2cf8a2d2 (diff) | |
download | openttd-0d9f80839f80edf41bd8ed75806b7901a553785a.tar.xz |
(svn r7127) -Codechange [FS#149]: Improve the usability of the signal-dragger, do not bail out
at (certain) errors, just silently ignore them.
-rw-r--r-- | rail_cmd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 2877389d5..65713beb6 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -795,12 +795,8 @@ static int32 CmdSignalTrackHelper(TileIndex tile, uint32 flags, uint32 p1, uint3 if (signal_ctr % signal_density == 0) { ret = DoCommand(tile, TrackdirToTrack(trackdir) | semaphores, signals, flags, (mode == 1) ? CMD_REMOVE_SIGNALS : CMD_BUILD_SIGNALS); - /* Abort placement for any other error than NOT_SUITABLE_TRACK - * This includes vehicles on track, competitor's tracks, etc. */ - if (CmdFailed(ret)) { - if (_error_message != STR_1005_NO_SUITABLE_RAILROAD_TRACK && mode != 1) return CMD_ERROR; - _error_message = INVALID_STRING_ID; - } else { + /* Be user-friendly and try placing signals as much as possible */ + if (!CmdFailed(ret)) { error = false; total_cost += ret; } |