From: divverent Date: Fri, 16 Jul 2010 22:25:12 +0000 (+0000) Subject: Bounds X-Git-Tag: xonotic-v0.1.0preview~326 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3738d0505f1778b8498e703be4d367af3f691f23;p=xonotic%2Fdarkplaces.git Bounds From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10345 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=961d03b211c568fab07a72b494aac3e9dbc6e842 --- diff --git a/view.c b/view.c index 70011bfa..0848d002 100644 --- a/view.c +++ b/view.c @@ -721,13 +721,13 @@ void V_CalcRefdef (void) { if (!cl.onground) { - cl.bobfall_speed = cl.velocity[2] * cl_bobfall.value; + cl.bobfall_speed = bound(-400, cl.velocity[2], 0) * bound(0, cl_bobfall.value, 0.1); cl.bobfall_swing = 1; } else { if(cl.bobfall_swing > 0) - cl.bobfall_swing -= cl_bobfallcycle.value; + cl.bobfall_swing -= bound(0, cl_bobfallcycle.value, 1); else cl.bobfall_swing = 0;