Tidy up event handling code in cg_weapons.c.