]> git.rm.cloudns.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)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 04:57:11 +0000 (06:57 +0200)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10345 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=961d03b211c568fab07a72b494aac3e9dbc6e842

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;