]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a small bug regarding bobfall
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Nov 2010 15:08:44 +0000 (15:08 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Nov 2010 15:08:44 +0000 (15:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10581 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index da240e586b9f7fd57ff9e5758bb981e37b8e5ccd..48a5dd4ba8ae284cf625fae84dc3b083402de23f 100644 (file)
--- a/view.c
+++ b/view.c
@@ -727,14 +727,11 @@ void V_CalcRefdef (void)
                                                        if (cl.velocity[2] < -cl_bobfallminspeed.value)
                                                                cl.bobfall_swing = 1;
                                                        else
-                                                               cl.bobfall_swing = 0;
+                                                               cl.bobfall_swing = 0; // TODO really?
                                                }
                                                else
                                                {
-                                                       if(cl.bobfall_swing > 0)
-                                                               cl.bobfall_swing -= bound(0, cl_bobfallcycle.value * frametime, 1);
-                                                       else
-                                                               cl.bobfall_swing = 0;
+                                                       cl.bobfall_swing = max(0, cl.bobfall_swing - cl_bobfallcycle.value * frametime);
 
                                                        bobfall = sin(M_PI * cl.bobfall_swing) * cl.bobfall_speed;
                                                        vieworg[2] += bobfall;