diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 966e9460ec..b1b6ae83b7 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -967,12 +967,6 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, cost.AddCost(RailClearCost(GetTileRailTypeByTrackBit(tile, trackbit))); - /* Charge extra to remove signals on the track, if they are there */ - if (HasSignalOnTrack(tile, track)) { - if (flags & DC_EXEC) CheckRemoveSignal(tile, track); - cost.AddCost(DoCommand(tile, track, 0, flags, CMD_REMOVE_SIGNALS)); - } - if (HasReservedTracks(tile, trackbit)) { v = GetTrainForReservation(tile, track); if (v != nullptr) { @@ -981,6 +975,11 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, } } + /* Charge extra to remove signals on the track, if they are there */ + if (HasSignalOnTrack(tile, track)) { + cost.AddCost(DoCommand(tile, track, 0, flags, CMD_REMOVE_SIGNALS)); + } + if (flags & DC_EXEC) { if (v != nullptr) FreeTrainTrackReservation(v);