This is why when I teach CCW classes, I tell people not to fire warning shots, EVER. There is no legal justification for firing a warning shot, your life is either threatened and you need to start smoking bad guys, or your life is not threatened and you need to hold your fire. Even in Missouri this man could have faced a charge. You never want to be in front of a jury explaining that you thought you were justified in firing off multiple shots with a centerfire rifle, but not justified enough to actually aim that rifle at any particular person.
He would have been better off, legally as well as literally, spending those rounds to drop the guy in the front of the pack with a mozambique, and anyone else who took a step forward thereafter. Castle doctrine or no castle doctrine, if you reasonably feel your life is in danger from multiple armed adversaries, it doesn't matter where you are, its a good shoot.