@@ -1218,13 +1218,13 @@ static CommandCost CmdSignalTrackHelper(
* remove - 1 remove signals, 0 build signals */
int signal_ctr = 0;
CommandCost last_error = CMD_ERROR;
bool had_success = false;
for (;;) {
/* only build/remove signals with the specified density */
if ((remove && autofill) || signal_ctr % signal_density == 0) {
if (remove || signal_ctr % signal_density == 0) {
uint32 p1 = GB(TrackdirToTrack(trackdir), 0, 3);
SB(p1, 3, 1, mode);
SB(p1, 4, 1, semaphores);
SB(p1, 5, 3, sigtype);
if (!remove && signal_ctr == 0) SetBit(p1, 17);
Status change: