From d525103d7a27f1927db64a10f633392452ccce6b Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 12 Jul 2010 18:03:54 +0000 Subject: [PATCH] Optimize cvars From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10284 d7cf8633-e32d-0410-b094-e92efae38249 --- view.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/view.c b/view.c index 4f781bb1..7d96c8c6 100644 --- 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); -- 2.39.2