]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Optimize cvars
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jul 2010 18:03:54 +0000 (18:03 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jul 2010 18:03:54 +0000 (18:03 +0000)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10284 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index 4f781bb1da20913d15ac991add3f130ceaa9c626..7d96c8c684a676597983de5f51baec86883c2ba2 100644 (file)
--- a/view.c
+++ b/view.c
@@ -39,9 +39,8 @@ cvar_t cl_rollangle = {0, "cl_rollangle", "2.0", "how much to tilt the view when
 cvar_t cl_bob = {CVAR_SAVE, "cl_bob","0.02", "view bobbing amount"};
 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_bobroll = {CVAR_SAVE, "cl_bobroll","1", "view rolling amount"};
+cvar_t cl_bobroll = {CVAR_SAVE, "cl_bobroll","0.01", "view rolling amount"};
 cvar_t cl_bobrollcycle = {CVAR_SAVE, "cl_bobrollcycle","0.5", "view rolling speed"};
-cvar_t cl_bobrollup = {CVAR_SAVE, "cl_bobrollup","0.01", "view bobbing adjustment that makes the up or down swing of the roll last longer"};
 cvar_t cl_bobrollairtime = {CVAR_SAVE, "cl_bobrollairtime","0.05", "how fast the view rolls 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"};
@@ -689,7 +688,7 @@ void V_CalcRefdef (void)
                                                                cl.bobroll_airtime = 0;
                                                }
 
-                                               cycle2 *= cl_bobrollup.value * cl.bobroll_airtime;
+                                               cycle2 *= cl_bobroll.value * cl.bobroll_airtime;
                                                bobroll = bound(0, xyspeed, sv_maxspeed.value) * cycle2;
                                                viewangles[2] = bound(-45, bobroll, 45);
                                        }
@@ -930,7 +929,6 @@ void V_Init (void)
        Cvar_RegisterVariable (&cl_bobup);
        Cvar_RegisterVariable (&cl_bobroll);
        Cvar_RegisterVariable (&cl_bobrollcycle);
-       Cvar_RegisterVariable (&cl_bobrollup);
        Cvar_RegisterVariable (&cl_bobrollairtime);
        Cvar_RegisterVariable (&cl_bobmodel);
        Cvar_RegisterVariable (&cl_bobmodel_side);