- // now the speed based on these angles. The division is for mathing vertical bobbing intensity
- side = DotProduct (cl.velocity, right) / 1000 * cl.bob2_airtime;
- front = DotProduct (cl.velocity, forward) / 1000 * cl.bob2_airtime;
- forward[0] *= bob;
- forward[1] *= bob;
- right[0] *= bob;
- right[1] *= bob;
- // we use side with forward and front with right so the side bobbing goes
- // to the side when we walk forward and to the front when we strafe.
- VectorMAMAM(side, forward, front, right, 0, up, bobvel);
- vieworg[0] += bound(-8, bobvel[0], 8);
- vieworg[1] += bound(-8, bobvel[1], 8);
+ // now get the speed based on those angles. The bounds should match the same value as xyspeed's
+ side = bound(-400, DotProduct (cl.velocity, right) * cl.bob2_smooth, 400);
+ front = bound(-400, DotProduct (cl.velocity, forward) * cl.bob2_smooth, 400);
+ VectorScale(forward, bob, forward);
+ VectorScale(right, bob, right);
+ // we use side with forward and front with right, so the bobbing goes
+ // to the side when we walk forward and to the front when we strafe
+ VectorMAMAM(side, forward, front, right, 0, up, bob2vel);
+ vieworg[0] += bob2vel[0];
+ vieworg[1] += bob2vel[1];