summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-05 12:36:57 +0100
committerGitHub <noreply@github.com>2021-01-05 12:36:57 +0100
commitbb28ff7226938f0882b67e2cffa0126ae26a5b5d (patch)
treea34b6c5d10e84c5b3c43f5c7dd137c0c214e2710 /src/rail_cmd.cpp
parentc017a3662a1e11be5ec4ea88c916488a1e8a2bca (diff)
downloadopenttd-bb28ff7226938f0882b67e2cffa0126ae26a5b5d.tar.xz
Codechange: DC_NO_RAIL_OVERLAP is a remnant of the OldAI. (#8496)
The OldAI was removed in 2009. Pretty sure we can remove this flag now too.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp8
1 files changed, 2 insertions, 6 deletions
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();