If the bad guy is shooting at everyone, don't shoot anyone shooting at the bad guy, and hopefully they won't shoot at you. It is a tough scenario. You never know if the shooter has partners. I vaguely remember a active shooter in a store, good guy with a gun puts a himself between a woman and...
If I had my own company or worked at an office that I could carry, and had a safe place for keeping a firearm. I believe I would keep one there all the time. Having a back up plan is never a bad idea. Probably would keep a handgun and a shotgun if I had the space. A V-Line flush mounted gun...