VectorCopy(cl.gunorg_follow, gunorg);
- // gun model bobbing code
+ // view bobbing code
xyspeed = sqrt(cl.movement_velocity[0]*cl.movement_velocity[0] + cl.movement_velocity[1]*cl.movement_velocity[1]);
if (cl_bob.value && cl_bobcycle.value)
{
bob = xyspeed * cl_bob.value;
bob = bob*0.3 + bob*0.7*cycle;
vieworg[2] += bound(-7, bob, 4);
- // we also need to adjust gunorg, or this appears like
- // pushing the gun! In the old code, this was applied
- // to vieworg BEFORE copying to gunorg, but this is not
- // viable with the new followmodel code as that would
- // mean that followmodel would work on the
- // munged-by-bob vieworg and do feedback
+ // we also need to adjust gunorg, or this appears like pushing the gun!
+ // In the old code, this was applied to vieworg BEFORE copying to gunorg,
+ // but this is not viable with the new followmodel code as that would mean
+ // that followmodel would work on the munged-by-bob vieworg and do feedback
gunorg[2] += bound(-7, bob, 4);
}
+ // gun model bobbing code
if (cl_bob.value && cl_bobmodel.value)
{
// calculate for swinging gun model