Of course it could have happened with the perp firing away.....you put the perp down who is firing period. Police have the right to protect themselves and duty to put these criminals down.
It'll be a happy day when folks understand that committing a crime, resisting the police, and open firing at them is BECAUSE of the people committing those crimes....not those trying to stop them.