@@ -459,6 +459,10 @@ CommandCost CmdBuildSingleRail(TileIndex
if (ret.Succeeded()) ret = EnsureNoTrainOnTrack(tile, track);
if (ret.Failed()) return ret;
ret = CheckRailSlope(tileh, trackbit, GetTrackBits(tile), tile);
cost.AddCost(ret);
if (HasSignals(tile) && TracksOverlap(GetTrackBits(tile) | TrackToTrackBits(track))) {
/* If adding the new track causes any overlap, all signals must be removed first */
if (!auto_remove_signals) return_cmd_error(STR_ERROR_MUST_REMOVE_SIGNALS_FIRST);
@@ -472,10 +476,6 @@ CommandCost CmdBuildSingleRail(TileIndex
}
/* If the rail types don't match, try to convert only if engines of
* the new rail type are not powered on the present rail type and engines of
* the present rail type are powered on the new rail type. */
Status change: