diff options
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 65713beb6..cb5ff4213 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -883,6 +883,9 @@ static int32 DoConvertRail(TileIndex tile, RailType totype, bool exec) // tile is already of requested type? if (GetRailType(tile) == totype) return CMD_ERROR; + // 'hidden' elrails can't be downgraded to normal rail when elrails are disabled + if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR; + // change type. if (exec) { TrackBits tracks; |