I doubt legislation would have helped much
Waiting periods and not selling guns to unfit people only keeps guns out of the hands of people who are poor, are utterly stupid, or are hotheads doing spur of the moment crimes, or one or more of the above. He was none of these. And sadly you can be quite psychotic or very bipolar and intelligent as all hell.
Since his crime was premeditated and highly preplanned, and there are plenty of guns to be had legally and otherwise, if he wanted a gun, he was going to find one. And if he couldn't get guns, he would probably have built some sort of IED or similar bomb.
Sadly, if you want to kill people, all it really takes in most societies is a third of a brain and a willingness to trade your life for the lives of others. (in a bad way)
If a maladjusted intelligent person is willing to take time and plan out their crime spree, there's not much any society can do to fully prevent them from hurting people.