]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Bounds
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 16 Jul 2010 22:25:12 +0000 (22:25 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 16 Jul 2010 22:25:12 +0000 (22:25 +0000)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10345 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index 70011bfa979c56f698949d9d9b69b4833dfb985b..0848d0024f0945ac65a90bd7e5a328d9cfac3903 100644 (file)
--- 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;