]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - view.c
don't use sv_gameplayfix_stepmultipletimes by default (except in Nexuiz)
[xonotic/darkplaces.git] / view.c
diff --git a/view.c b/view.c
index 9e4a7f05a1641f9f2b3939162ff1e651354b24a1..345e86d9d5a88490fa7dca2032da3c646de206e2 100644 (file)
--- a/view.c
+++ b/view.c
@@ -478,9 +478,9 @@ void V_CalcRefdef (void)
                        else
                        {
                                if (cl.stairsmoothz < vieworg[2])
-                                       vieworg[2] = cl.stairsmoothz = bound(vieworg[2] - 16, cl.stairsmoothz + smoothtime * cl_stairsmoothspeed.value, vieworg[2]);
+                                       vieworg[2] = cl.stairsmoothz = bound(vieworg[2] - cl.movevars_stepheight, cl.stairsmoothz + smoothtime * cl_stairsmoothspeed.value, vieworg[2]);
                                else if (cl.stairsmoothz > vieworg[2])
-                                       vieworg[2] = cl.stairsmoothz = bound(vieworg[2], cl.stairsmoothz - smoothtime * cl_stairsmoothspeed.value, vieworg[2] + 16);
+                                       vieworg[2] = cl.stairsmoothz = bound(vieworg[2], cl.stairsmoothz - smoothtime * cl_stairsmoothspeed.value, vieworg[2] + cl.movevars_stepheight);
                        }
 
                        // apply qw weapon recoil effect (this did not work in QW)
@@ -680,9 +680,9 @@ void V_CalcRefdef (void)
                                                cycle = cl.time / cl_bob2cycle.value;
                                                cycle -= (int) cycle;
                                                if (cycle < 0.5)
-                                                       cycle = sin(M_PI * cycle / 0.5);
+                                                       cycle = cos(M_PI * cycle / 0.5); // cos looks better here with the other view bobbing using sin
                                                else
-                                                       cycle = sin(M_PI + M_PI * (cycle-0.5)/0.5);
+                                                       cycle = cos(M_PI + M_PI * (cycle-0.5)/0.5);
                                                bob = bound(0, cl_bob2.value, 0.05) * cycle;
 
                                                // this value slowly decreases from 1 to 0 when we stop touching the ground.
@@ -736,14 +736,13 @@ void V_CalcRefdef (void)
                                                        else
                                                                cl.bobfall_swing = 0;
 
-                                                       bobfall = sin(M_PI + M_PI * cl.bobfall_swing) * -cl.bobfall_speed;
+                                                       bobfall = sin(M_PI * cl.bobfall_swing) * cl.bobfall_speed;
                                                        vieworg[2] += bobfall;
                                                        gunorg[2] += bobfall;
                                                }
                                        }
 
                                        // gun model bobbing code
-                                       if (cl_bob.value || cl_bob2.value)
                                        if (cl_bobmodel.value)
                                        {
                                                // calculate for swinging gun model