Everything about that scenario sucks so bad.
Yes, the dump of cortisol and other chemicals into the the detective's body would have been extreme. The mag dump through the windshield, in the context of some of the other things we have discussed in this thread, is understandable (although a bad practice).
It's hard not to make excuses for the guy, but...
Hood-to-hood is no bueno. You are already at a disadvantage because we as police officers are always reacting to the threat. We have to wait for the bad guy to make a move first which always puts us behind. Someone in another thread brought up Miami within the past couple days. That lesson was learned long ago yet here we are.
Within just the past 13 years lots of cool-guy instructors began teaching about shooting from inside vehicles. Some of it may be sound and some of it not. Having shot through auto glass in a range setting a bunch of times I would say you are much better off not shooting through it if you can help it. Did our detective here learn something in a class or video that made that his go to or what it just his natural startle response? He's shooting through two windshields essentially making hit probability and ballistic effectiveness go way down.
In this scenario, had he been able to take a quick breath and "assess" he might have fired around his own windshield (from the v of the door) and slowed down just the tiniest fraction of a second getting better hits. Yes, I know there is an automatic weapon being fired at him, but teaching yourself to suck oxygen in (literally take a deep breath) to reduce the effect of cortisol is a vital training tool to allow for sound decision making. Guys like Dave Grossman have been teaching about this for nearly 30 years and it should be part of every academy and UofF in-service. It can mean the difference between needlessly wasting a mag of ammo or disabling an opponent. The difference between life and death.