]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
System to calculate the walking direction properly. The code is very dirty and not...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jul 2010 18:05:21 +0000 (18:05 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jul 2010 18:05:21 +0000 (18:05 +0000)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

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

view.c

diff --git a/view.c b/view.c
index 658fba51c3f2b28928362ce06107a85729344459..38cabd128b5f9e080d38696f1c34e290461daa9f 100644 (file)
--- a/view.c
+++ b/view.c
@@ -687,16 +687,29 @@ void V_CalcRefdef (void)
                                                // (don't count Z, or jumping messes it up)
                                                bob = xyspeed * cl_bob_side.value;
                                                bob = bob*0.3 + bob*0.7*cycle;
-                                               vieworg[1] += bound(-7, bob, 4);
-                                               vieworg[0] += bound(-7, bob, 4);
+                                               //vieworg[1] += bound(-7, bob, 4);
+                                               //vieworg[0] += bound(-7, bob, 4);
                                                // we also need to adjust gunorg, or this appears like pushing the gun!
                                                // In the old code, this was applied to vieworg BEFORE copying to gunorg,
                                                // but this is not viable with the new followmodel code as that would mean
                                                // that followmodel would work on the munged-by-bob vieworg and do feedback
-                                               gunorg[1] += bound(-7, bob, 4);
-                                               gunorg[0] += bound(-7, bob, 4);
+                                               //gunorg[1] += bound(-7, bob, 4);
+                                               //gunorg[0] += bound(-7, bob, 4);
                                                //vieworg[0] += bound(-7, bob, 4);
                                        }
+                                       
+                                       //TEST!!!
+                                       vec3_t wishvel;
+                                       vec3_t forward;
+                                       vec3_t right;
+                                       vec3_t 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);
+                                       vieworg[0] += wishvel[0];
+                                       vieworg[1] += wishvel[1];
+                                       //End of TEST!!!
 
                                        // view rolling code
                                        if (cl_bobroll.value && cl_bobrollcycle.value)