From: divverent Date: Fri, 16 Jul 2010 22:25:25 +0000 (+0000) Subject: Fix the final details and disable by default. Use cl_bobfall 0.05 to test at a good... X-Git-Tag: xonotic-v0.1.0preview~324 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56a24eab789c0baa4a86bef14f15ab6933ae14fe;p=xonotic%2Fdarkplaces.git Fix the final details and disable by default. Use cl_bobfall 0.05 to test at a good value. Ready for testing and merging. From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10347 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=d23aff344864786260c8beb87f3990e1434e173d --- diff --git a/darkplaces.txt b/darkplaces.txt index c68c9202..07903b27 100644 --- a/darkplaces.txt +++ b/darkplaces.txt @@ -400,7 +400,7 @@ cl_bob2 0 sideways v cl_bob2cycle 0.6 sideways view bobbing speed cl_bob2smooth 0.05 how fast the view goes back when you stop touching the ground cl_bobfall 0 how much the view swings down when falling (influenced by the speed you hit the ground with) -cl_bobfallcycle 0.25 speed of the bobfall swing +cl_bobfallcycle 0.025 speed of the bobfall swing cl_bobfallspeed 200 necessary amount of speed for bob-falling to occur cl_bobmodel 1 enables gun bobbing cl_bobmodel_side 0.05 gun bobbing sideways sway amount diff --git a/view.c b/view.c index fd362e5c..eef07b4c 100644 --- a/view.c +++ b/view.c @@ -42,7 +42,7 @@ cvar_t cl_bobup = {CVAR_SAVE, "cl_bobup","0.5", "view bobbing adjustment that ma cvar_t cl_bob2 = {CVAR_SAVE, "cl_bob2","0", "sideways view bobbing amount"}; cvar_t cl_bob2cycle = {CVAR_SAVE, "cl_bob2cycle","0.6", "sideways view bobbing speed"}; cvar_t cl_bob2smooth = {CVAR_SAVE, "cl_bob2smooth","0.05", "how fast the view goes back when you stop touching the ground"}; -cvar_t cl_bobfall = {CVAR_SAVE, "cl_bobfall","0.05", "how much the view swings down when falling (influenced by the speed you hit the ground with)"}; +cvar_t cl_bobfall = {CVAR_SAVE, "cl_bobfall","0", "how much the view swings down when falling (influenced by the speed you hit the ground with)"}; cvar_t cl_bobfallcycle = {CVAR_SAVE, "cl_bobfallcycle","0.025", "speed of the bobfall swing"}; cvar_t cl_bobfallminspeed = {CVAR_SAVE, "cl_bobfallminspeed","200", "necessary amount of speed for bob-falling to occur"}; cvar_t cl_bobmodel = {CVAR_SAVE, "cl_bobmodel", "1", "enables gun bobbing"}; @@ -590,7 +590,7 @@ void V_CalcRefdef (void) VectorAdd(vieworg, cl.punchvector, vieworg); if (cl.stats[STAT_HEALTH] > 0) { - double xyspeed, bob; + double xyspeed, bob, bobfall; float cycle; vec_t frametime; @@ -735,8 +735,9 @@ void V_CalcRefdef (void) else cl.bobfall_swing = 0; - vieworg[2] += sin(M_PI + M_PI * cl.bobfall_swing) * -cl.bobfall_speed; - gunorg[2] += sin(M_PI + M_PI * cl.bobfall_swing) * -cl.bobfall_speed; + bobfall = sin(M_PI + M_PI * cl.bobfall_swing) * -cl.bobfall_speed; + vieworg[2] += bobfall; + gunorg[2] += bobfall; } }