src/road_cmd.cpp
branchnoai
changeset 10713 c5c9dc32c052
parent 10645 8cbdb511a674
child 10715 6bdf79ffb022
equal deleted inserted replaced
10691:a60393d87c0b 10713:c5c9dc32c052
   891 		case ROAD_TILE_NORMAL: {
   891 		case ROAD_TILE_NORMAL: {
   892 			RoadBits b = GetAllRoadBits(tile);
   892 			RoadBits b = GetAllRoadBits(tile);
   893 
   893 
   894 			/* Clear the road if only one piece is on the tile OR the AI tries
   894 			/* Clear the road if only one piece is on the tile OR the AI tries
   895 			 * to clear town road OR we are not using the DC_AUTO flag */
   895 			 * to clear town road OR we are not using the DC_AUTO flag */
   896 			if ((CountBits(b) == 1 && GetRoadBits(tile, ROADTYPE_TRAM) == ROAD_NONE) ||
   896 			if ((CountBits(b) == 1 && GetRoadBits(tile, ROADTYPE_TRAM) == ROAD_NONE) || !(flags & DC_AUTO)
   897 			    IsTileOwner(tile, OWNER_TOWN) || !(flags & DC_AUTO)
       
   898 				) {
   897 				) {
   899 				RoadTypes rts = GetRoadTypes(tile);
   898 				RoadTypes rts = GetRoadTypes(tile);
   900 				CommandCost ret(EXPENSES_CONSTRUCTION);
   899 				CommandCost ret(EXPENSES_CONSTRUCTION);
   901 				for (RoadType rt = ROADTYPE_ROAD; rt < ROADTYPE_END; rt++) {
   900 				for (RoadType rt = ROADTYPE_ROAD; rt < ROADTYPE_END; rt++) {
   902 					if (HasBit(rts, rt)) {
   901 					if (HasBit(rts, rt)) {