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.
This commit is contained in:
Patric Stout
2021-01-05 12:36:57 +01:00
committed by GitHub
parent c017a3662a
commit bb28ff7226
2 changed files with 3 additions and 7 deletions

View File

@@ -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();