(svn r12346) -Fix [FS#1748, FS#1825](r9874, r11872): Remove duplicated and inconsistent code wrt. autoreplace with rules in both vehicles' group and ALL_GROUP.
/* $Id$ *//** @file road_map.cpp */#include"stdafx.h"#include"openttd.h"#include"bridge_map.h"#include"tile_cmd.h"#include"road_map.h"#include"station.h"#include"tunnel_map.h"#include"station_map.h"#include"depot.h"#include"tunnelbridge_map.h"RoadBitsGetAnyRoadBits(TileIndextile,RoadTypert){if(!HasTileRoadType(tile,rt))returnROAD_NONE;switch(GetTileType(tile)){caseMP_ROAD:switch(GetRoadTileType(tile)){default:caseROAD_TILE_NORMAL:returnGetRoadBits(tile,rt);caseROAD_TILE_CROSSING:returnGetCrossingRoadBits(tile);caseROAD_TILE_DEPOT:returnDiagDirToRoadBits(GetRoadDepotDirection(tile));}caseMP_STATION:if(!IsRoadStopTile(tile))returnROAD_NONE;if(IsDriveThroughStopTile(tile))return(GetRoadStopDir(tile)==DIAGDIR_NE)?ROAD_X:ROAD_Y;returnDiagDirToRoadBits(GetRoadStopDir(tile));caseMP_TUNNELBRIDGE:if(GetTunnelBridgeTransportType(tile)!=TRANSPORT_ROAD)returnROAD_NONE;returnDiagDirToRoadBits(ReverseDiagDir(GetTunnelBridgeDirection(tile)));default:returnROAD_NONE;}}TrackBitsGetAnyRoadTrackBits(TileIndextile,RoadTypert){/* Don't allow local authorities to build roads through road depots or road stops. */if(IsRoadDepotTile(tile)||(IsTileType(tile,MP_STATION)&&!IsDriveThroughStopTile(tile))||!HasTileRoadType(tile,rt)){returnTRACK_BIT_NONE;}returnTrackStatusToTrackBits(GetTileTrackStatus(tile,TRANSPORT_ROAD,RoadTypeToRoadTypes(rt)));}