From a1480ebda779c9972c3a25032baf16e15615d53e Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 12 Jul 2010 18:05:40 +0000 Subject: [PATCH] Got the correct formula working. Code still not in place and doesn't do what it should, fixing that next. From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10293 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=086be9db611541e7973b933d988884bbd64b90f4 --- view.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/view.c b/view.c index 38cabd12..35d9e3d5 100644 --- a/view.c +++ b/view.c @@ -700,13 +700,15 @@ void V_CalcRefdef (void) //TEST!!! vec3_t wishvel; - vec3_t forward; - vec3_t right; - vec3_t up; + vec3_t forward, right, up; AngleVectors(viewangles, forward, right, up); - VectorSet(forward, 0, 0, 0); - VectorSet(right, 0, 0, 0); - VectorMAMAM(cl.cmd.forwardmove, forward, cl.cmd.sidemove, right, cl.cmd.upmove, up, wishvel); + forward[0] *= 0.1; + forward[1] *= 0.1; + right[0] *= 0.1; + right[1] *= 0.1; + // we use cl.cmd.sidemove with forward and cl.cmd.forwardmove with right so the side bobbing + // goes to the side when we walk forward and to the front when we strafe + VectorMAMAM(cl.cmd.sidemove, forward, cl.cmd.forwardmove, right, cl.cmd.upmove, up, wishvel); vieworg[0] += wishvel[0]; vieworg[1] += wishvel[1]; //End of TEST!!! -- 2.39.2