src/road_cmd.cpp
changeset 6459 8c66c58bf6cf
parent 6442 10b44714b85d
child 6460 b3017e083031
equal deleted inserted replaced
6458:5cd016e1f018 6459:8c66c58bf6cf
   516 
   516 
   517 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
   517 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
   518 
   518 
   519 	if (p1 > 3) return CMD_ERROR; // check direction
   519 	if (p1 > 3) return CMD_ERROR; // check direction
   520 
   520 
   521 	if (!EnsureNoVehicle(tile)) return CMD_ERROR;
       
   522 
       
   523 	tileh = GetTileSlope(tile, NULL);
   521 	tileh = GetTileSlope(tile, NULL);
   524 	if (tileh != SLOPE_FLAT && (
   522 	if (tileh != SLOPE_FLAT && (
   525 				!_patches.build_on_slopes ||
   523 				!_patches.build_on_slopes ||
   526 				IsSteepSlope(tileh) ||
   524 				IsSteepSlope(tileh) ||
   527 				!CanBuildDepotByTileh(p1, tileh)
   525 				!CanBuildDepotByTileh(p1, tileh)