]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
disabled cl.stairoffset adjustments when airborn
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Feb 2007 15:52:17 +0000 (15:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Feb 2007 15:52:17 +0000 (15:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6825 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index 002819125fba21f9a60379b678b495884de6effb..4d40d8d472285ad59943e1d0ec5cf7ed5e2d5b4d 100644 (file)
--- a/view.c
+++ b/view.c
@@ -365,9 +365,14 @@ void V_CalcRefdef (void)
 
                // update the stairoffset if the player entity has gone up or down without leaving the ground
                //Con_Printf("cl.onground %i oldz %f newz %f vel %f %f %f\n", cl.onground, oldz, vieworg[2], cl.movement_velocity[0], cl.movement_velocity[1], cl.movement_velocity[2]);
-               cl.stairoffset -= vieworg[2] - oldz;
+               if (cl.onground)
+               {
+                       cl.stairoffset -= vieworg[2] - oldz;
+                       cl.stairoffset = bound(-16, cl.stairoffset, 16);
+               }
+               else
+                       cl.stairoffset = 0;
                oldz = vieworg[2];
-               cl.stairoffset = bound(-16, cl.stairoffset, 16);
 
                if (cl.intermission)
                {