From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10313
d7cf8633-e32d-0410-b094-
e92efae38249
// calculate the front and side of the player between the X and Y axes
AngleVectors(viewangles, forward, right, up);
// calculate the front and side of the player between the X and Y axes
AngleVectors(viewangles, forward, right, up);
- // now get the speed based on those angles. The division is for mathing vertical bob intensity
- side = DotProduct (cl.velocity, right) * cl.bob2_smooth;
- front = DotProduct (cl.velocity, forward) * cl.bob2_smooth;
+ // 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
VectorScale(forward, bob, forward);
VectorScale(right, bob, right);
// we use side with forward and front with right, so the bobbing goes