From: divverent Date: Mon, 12 Jul 2010 18:05:40 +0000 (+0000) Subject: Got the correct formula working. Code still not in place and doesn't do what it shoul... X-Git-Tag: xonotic-v0.1.0preview~230^2~185 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=086be9db611541e7973b933d988884bbd64b90f4;p=xonotic%2Fdarkplaces.git 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 --- 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!!!