From 5ac9fa10e177c00c007ffcbee3004772502f530f Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 3 Feb 2021 03:37:06 +0000 Subject: [PATCH] Fix signal dragging when obstructed by train reservation --- src/rail_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 2b78c6574c..357df16bcb 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1884,7 +1884,7 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, DoCommandFlag flags, uin last_suitable_ctr = signal_ctr; last_suitable_tile = tile; last_suitable_trackdir = trackdir; - } else if (!test_only && last_suitable_tile != INVALID_TILE) { + } else if (!test_only && last_suitable_tile != INVALID_TILE && ret.GetErrorMessage() != STR_ERROR_CANNOT_MODIFY_TRACK_TRAIN_APPROACHING) { /* If a signal can't be placed, place it at the last possible position. */ SB(p1, 0, 3, TrackdirToTrack(last_suitable_trackdir)); ClrBit(p1, 17);