weapon_xoffset is a constantly updated gamevar holding the offset for the x position of a sprite for weapon sway. This seems to be determined by the xvel of the APLAYER actor.