]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
view: Refactor V_CalcRefDefUsing. Fully implement classic Quake-style weapon bob
[xonotic/darkplaces.git] / common.c
index f91fc8991e7224a0b77f28e325919a65df4ccbc4..c36deb2d279fe2639ec95da911696a87d0b9724d 100644 (file)
--- a/common.c
+++ b/common.c
@@ -869,11 +869,11 @@ Used by view and sv_user
 */
 float Com_CalcRoll (const vec3_t angles, const vec3_t velocity, const vec_t angleval, const vec_t velocityval)
 {
-       vec3_t  right;
+       vec3_t  forward, right, up;
        float   sign;
        float   side;
 
-       AngleVectors (angles, NULL, right, NULL);
+       AngleVectors (angles, forward, right, up);
        side = DotProduct (velocity, right);
        sign = side < 0 ? -1 : 1;
        side = fabs(side);