summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-02-23 18:29:55 +0000
committerrubidium <rubidium@openttd.org>2013-02-23 18:29:55 +0000
commit35570156ddc4c50fcea1e593b749a460f7c1be20 (patch)
tree0ba390f4aa7fd2549453ab650a6ef659cf82a53a /src
parent0c8b215935cd4eb13d60e1c325f59679ec4a0d82 (diff)
downloadopenttd-35570156ddc4c50fcea1e593b749a460f7c1be20.tar.xz
(svn r25038) -Fix [FS#5479]: minimise gaps feature caused removal to only happen at the signal build interval instead of the implicit interval of 1
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 45079646c..56b87b955 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1320,7 +1320,7 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, DoCommandFlag flags, uin
if (HasBit(signal_dir, 1)) signals |= SignalAgainstTrackdir(trackdir);
/* Test tiles in between for suitability as well if minimising gaps. */
- bool test_only = minimise_gaps && signal_ctr < (last_used_ctr + signal_density);
+ bool test_only = !remove && minimise_gaps && signal_ctr < (last_used_ctr + signal_density);
CommandCost ret = DoCommand(tile, p1, signals, test_only ? flags & ~DC_EXEC : flags, remove ? CMD_REMOVE_SIGNALS : CMD_BUILD_SIGNALS);
if (ret.Succeeded()) {