Man sentenced to three years for opening fire in Del Mar