Hi,
i have a problem with an weapon code from the aum
i was try to use the weapon offset ( walk waving )

it works very fine but when the player stop to walk
the gun will stop at a different position as it starts to wave
and sometimes the gun will goes totaly offset

how can i wrote that the gun will stop at the gun position where
the gun starts


Code:
if (vec_dist (player_pos1.x, player_pos2.x) != 0)
      {
	weapon_height += 35 * time_step; 
	my.z += 0.03 * sin(weapon_height);
      }