]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Got the correct formula working. Code still not in place and doesn't do what it shoul...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jul 2010 18:05:40 +0000 (18:05 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jul 2010 18:05:40 +0000 (18:05 +0000)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10293 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index 38cabd128b5f9e080d38696f1c34e290461daa9f..35d9e3d59aabe797894469cce4ee07507467124e 100644 (file)
--- 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!!!