My solution to preventing mass shootings
The best way to prevent mass shooting is as follows:
Killing the shooter immediately if you can securely prove it was them. If they screwed up this bad then you don't owe them a goodbye to their family. Sometimes it is so obvious who did it that it would actually be bad to give them a trial because it would by delaying justice.
Then dispose of their remains in an undisclosed location. If the shooter killed themselves beforehand still do this. Cruel and unusual punishments need be brought back for cases such as this. The United states is just set up for failure by allowing these people to live long and receive a trial. They must pay immediately and drastically for their crimes.
I would think this should be incentive enough. Shooters won't be able to live long or say goodbye to their families and will be denied a decent burial. If this won't make people decide not to shoot up places, nothing will.