summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command_type.h2
-rw-r--r--src/rail_cmd.cpp8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/command_type.h b/src/command_type.h
index 0620b96b6..2419d7b31 100644
--- a/src/command_type.h
+++ b/src/command_type.h
@@ -349,7 +349,7 @@ enum DoCommandFlag {
DC_AUTO = 0x002, ///< don't allow building on structures
DC_QUERY_COST = 0x004, ///< query cost only, don't build.
DC_NO_WATER = 0x008, ///< don't allow building on water
- DC_NO_RAIL_OVERLAP = 0x010, ///< don't allow overlap of rails (used in buildrail)
+ // 0x010 is unused
DC_NO_TEST_TOWN_RATING = 0x020, ///< town rating does not disallow you from building
DC_BANKRUPT = 0x040, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases
DC_AUTOREPLACE = 0x080, ///< autoreplace/autorenew is in progress, this shall disable vehicle limits when building, and ignore certain restrictions when undoing things (like vehicle attach callback)
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index a71441532..34ad07d52 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -263,12 +263,8 @@ static CommandCost CheckTrackCombination(TileIndex tile, TrackBits to_build, uin
}
/* Let's see if we may build this */
- if ((flags & DC_NO_RAIL_OVERLAP) || HasSignals(tile)) {
- /* If we are not allowed to overlap (flag is on for ai companies or we have
- * signals on the tile), check that */
- if (future != TRACK_BIT_HORZ && future != TRACK_BIT_VERT) {
- return_cmd_error((flags & DC_NO_RAIL_OVERLAP) ? STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION : STR_ERROR_MUST_REMOVE_SIGNALS_FIRST);
- }
+ if (HasSignals(tile) && future != TRACK_BIT_HORZ && future != TRACK_BIT_VERT) {
+ return_cmd_error(STR_ERROR_MUST_REMOVE_SIGNALS_FIRST);
}
/* Normally, we may overlap and any combination is valid */
return CommandCost();