From: havoc Date: Fri, 6 Apr 2007 05:22:01 +0000 (+0000) Subject: cl_bobmodel_side and cl_bobmodel_up cvars now are scaled by cl_viewmodel_scale so... X-Git-Tag: xonotic-v0.1.0preview~3363 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=83959525309b69a838b4a73e9ea9920c33b4f95f;p=xonotic%2Fdarkplaces.git cl_bobmodel_side and cl_bobmodel_up cvars now are scaled by cl_viewmodel_scale so that cl_viewmodel_scale can be changed without affecting the amount of viewmodel movement on the screen git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7056 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/view.c b/view.c index b21fbf55..64d1b7ce 100644 --- a/view.c +++ b/view.c @@ -39,8 +39,8 @@ 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_bobmodel = {CVAR_SAVE, "cl_bobmodel", "1", "enables gun bobbing"}; -cvar_t cl_bobmodel_side = {CVAR_SAVE, "cl_bobmodel_side", "0.05", "gun bobbing sideways sway amount"}; -cvar_t cl_bobmodel_up = {CVAR_SAVE, "cl_bobmodel_up", "0.02", "gun bobbing upward movement amount"}; +cvar_t cl_bobmodel_side = {CVAR_SAVE, "cl_bobmodel_side", "0.15", "gun bobbing sideways sway amount"}; +cvar_t cl_bobmodel_up = {CVAR_SAVE, "cl_bobmodel_up", "0.06", "gun bobbing upward movement amount"}; cvar_t cl_bobmodel_speed = {CVAR_SAVE, "cl_bobmodel_speed", "7", "gun bobbing speed"}; cvar_t cl_viewmodel_scale = {0, "cl_viewmodel_scale", "0.3", "changes size of gun model, lower values prevent poking into walls but cause strange artifacts on lighting and especially r_stereo/vid_stereobuffer options where the size of the gun becomes visible"}; @@ -482,9 +482,9 @@ void V_CalcRefdef (void) bspeed = bound (0, xyspeed, 400) * 0.01f; AngleVectors (viewangles, forward, right, up); - bob = bspeed * cl_bobmodel_side.value * sin (s) * t; + bob = bspeed * cl_bobmodel_side.value * cl_viewmodel_scale.value * sin (s) * t; VectorMA (gunorg, bob, right, gunorg); - bob = bspeed * cl_bobmodel_up.value * cos (s * 2) * t; + bob = bspeed * cl_bobmodel_up.value * cl_viewmodel_scale.value * cos (s * 2) * t; VectorMA (gunorg, bob, up, gunorg); } }