From: havoc Date: Sun, 11 Feb 2007 15:52:17 +0000 (+0000) Subject: disabled cl.stairoffset adjustments when airborn X-Git-Tag: xonotic-v0.1.0preview~3589 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=24454d912d09690d8a43ff7a8ee32a86b09c5c49;p=xonotic%2Fdarkplaces.git disabled cl.stairoffset adjustments when airborn git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6825 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/view.c b/view.c index 00281912..4d40d8d4 100644 --- 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) {