From f3ec4cfe6ea7f4f651bbb8f6dbd6d19127447aac Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 12 Jul 2010 18:08:43 +0000 Subject: [PATCH] Get rid of cl_bob2up. It's not good for -sideways- movement From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10308 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=d1da9bf067d77de10c307c7b27469b53af7a4fff --- darkplaces.txt | 1 - view.c | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/darkplaces.txt b/darkplaces.txt index a984a859..eb3b3033 100644 --- a/darkplaces.txt +++ b/darkplaces.txt @@ -426,7 +426,6 @@ cl_followmodel_up_highpass1 60 gun follow cl_followmodel_up_highpass 3 gun following upward highpass in 1/s cl_followmodel_up_lowpass 30 gun following upward lowpass in 1/s cl_bobup 0.5 view bobbing adjustment that makes the up or down swing of the bob last longer -cl_bob2up 0.5 view bobbing adjustment that makes the side swing of the bob last longer cl_capturevideo 0 enables saving of video to a .avi file using uncompressed I420 colorspace and PCM audio, note that scr_screenshot_gammaboost affects the brightness of the output) cl_capturevideo_fps 30 how many frames per second to save (29.97 for NTSC, 30 for typical PC video, 15 can be useful) cl_capturevideo_number 1 number to append to video filename, incremented each time a capture begins diff --git a/view.c b/view.c index a5dcebcc..ed3739f5 100644 --- a/view.c +++ b/view.c @@ -41,7 +41,6 @@ cvar_t cl_bobcycle = {CVAR_SAVE, "cl_bobcycle","0.6", "view bobbing speed"}; cvar_t cl_bobup = {CVAR_SAVE, "cl_bobup","0.5", "view bobbing adjustment that makes the up or down swing of the bob last longer"}; 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_bob2up = {CVAR_SAVE, "cl_bob2up","0.5", "view bobbing adjustment that makes the side swing of the bob last longer"}; 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_bobmodel = {CVAR_SAVE, "cl_bobmodel", "1", "enables gun bobbing"}; cvar_t cl_bobmodel_side = {CVAR_SAVE, "cl_bobmodel_side", "0.15", "gun bobbing sideways sway amount"}; @@ -674,10 +673,10 @@ void V_CalcRefdef (void) cycle = cl.time / cl_bob2cycle.value; cycle -= (int) cycle; - if (cycle < cl_bob2up.value) - cycle = sin(M_PI * cycle / cl_bob2up.value); + if (cycle < 0.5) + cycle = sin(M_PI * cycle / 0.5); else - cycle = sin(M_PI + M_PI * (cycle-cl_bob2up.value)/(1.0 - cl_bob2up.value)); + cycle = sin(M_PI + M_PI * (cycle-0.5)/0.5); bob = xyspeed * cl_bob2.value * cycle; // this value slowly decreases from 1 to 0 when we stop touching the ground. @@ -948,7 +947,6 @@ void V_Init (void) Cvar_RegisterVariable (&cl_bobup); Cvar_RegisterVariable (&cl_bob2); Cvar_RegisterVariable (&cl_bob2cycle); - Cvar_RegisterVariable (&cl_bob2up); Cvar_RegisterVariable (&cl_bob2smooth); Cvar_RegisterVariable (&cl_bobmodel); Cvar_RegisterVariable (&cl_bobmodel_side); -- 2.39.2