From: divverent Date: Sat, 6 Nov 2010 15:08:44 +0000 (+0000) Subject: fix a small bug regarding bobfall X-Git-Tag: xonotic-v0.1.0preview~80 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79ffce5af065c39fb86f8292091b6e0e9a495263;p=xonotic%2Fdarkplaces.git fix a small bug regarding bobfall git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10581 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=3e3a733d66e1e496893615ec9d998063350739c8 --- diff --git a/view.c b/view.c index da240e58..48a5dd4b 100644 --- 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;