]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Working on improving stairsmoothing so that it doesn't jitter samual/fix_stepheight_resetting
authorSamual <samual@xonotic.org>
Sun, 8 Jan 2012 23:35:42 +0000 (18:35 -0500)
committerSamual <samual@xonotic.org>
Sun, 8 Jan 2012 23:35:42 +0000 (18:35 -0500)
view.c

diff --git a/view.c b/view.c
index 6e5de1589154f3cb7678cd24c701464e9a2cb2f3..30de56b394a5f74bc0d231b47243b38f15893f96 100644 (file)
--- a/view.c
+++ b/view.c
@@ -487,9 +487,13 @@ void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewa
        }
        else
        {
+               Con_Printf("last on ground time: %f, with z velocity of: %f\n", cl.lastongroundtime, cl.velocity[2]);
+               
                // smooth stair stepping, but only if clonground and enabled
-               if (!clonground || cl_stairsmoothspeed.value <= 0 || teleported)
+               if (smoothtime == 0.1 || cl_stairsmoothspeed.value <= 0 || teleported)
+               {
                        cl.stairsmoothz = vieworg[2];
+               }
                else
                {
                        if (cl.stairsmoothz < vieworg[2])