mirror of
https://github.com/ENSL/NS.git
synced 2024-11-29 07:41:53 +00:00
add cl_bobview
This commit is contained in:
parent
48da9f7260
commit
ae447029c0
5 changed files with 27 additions and 5 deletions
|
@ -179,7 +179,9 @@ lightgamma "2"
|
||||||
ex_interp "0.05"
|
ex_interp "0.05"
|
||||||
cl_cross "1"
|
cl_cross "1"
|
||||||
rate "30000"
|
rate "30000"
|
||||||
cl_bob "0"
|
cl_bob "0.01"
|
||||||
|
cl_bobcycle "0.8"
|
||||||
|
cl_bob "0.5"
|
||||||
cl_weaponswap "2"
|
cl_weaponswap "2"
|
||||||
|
|
||||||
+mlook
|
+mlook
|
||||||
|
|
|
@ -124,6 +124,7 @@ cvar_t *cl_yawspeed;
|
||||||
cvar_t *cl_pitchspeed;
|
cvar_t *cl_pitchspeed;
|
||||||
cvar_t *cl_anglespeedkey;
|
cvar_t *cl_anglespeedkey;
|
||||||
cvar_t *cl_vsmoothing;
|
cvar_t *cl_vsmoothing;
|
||||||
|
cvar_t *cl_bobview;
|
||||||
cvar_t *cl_autohelp;
|
cvar_t *cl_autohelp;
|
||||||
cvar_t *cl_centerentityid;
|
cvar_t *cl_centerentityid;
|
||||||
cvar_t *cl_musicenabled;
|
cvar_t *cl_musicenabled;
|
||||||
|
@ -1619,6 +1620,7 @@ void InitInput (void)
|
||||||
cl_pitchdown = gEngfuncs.pfnRegisterVariable ( "cl_pitchdown", "89", 0 );
|
cl_pitchdown = gEngfuncs.pfnRegisterVariable ( "cl_pitchdown", "89", 0 );
|
||||||
|
|
||||||
cl_vsmoothing = gEngfuncs.pfnRegisterVariable ( "cl_vsmoothing", "0.05", FCVAR_ARCHIVE );
|
cl_vsmoothing = gEngfuncs.pfnRegisterVariable ( "cl_vsmoothing", "0.05", FCVAR_ARCHIVE );
|
||||||
|
cl_bobview = gEngfuncs.pfnRegisterVariable ( "cl_bobview", "0", FCVAR_ARCHIVE );
|
||||||
|
|
||||||
m_pitch = gEngfuncs.pfnRegisterVariable ( "m_pitch","0.022", FCVAR_ARCHIVE );
|
m_pitch = gEngfuncs.pfnRegisterVariable ( "m_pitch","0.022", FCVAR_ARCHIVE );
|
||||||
m_yaw = gEngfuncs.pfnRegisterVariable ( "m_yaw","0.022", FCVAR_ARCHIVE );
|
m_yaw = gEngfuncs.pfnRegisterVariable ( "m_yaw","0.022", FCVAR_ARCHIVE );
|
||||||
|
|
|
@ -77,6 +77,7 @@ when crossing a water boudnary.
|
||||||
extern cvar_t *chase_active;
|
extern cvar_t *chase_active;
|
||||||
extern cvar_t *scr_ofsx, *scr_ofsy, *scr_ofsz;
|
extern cvar_t *scr_ofsx, *scr_ofsy, *scr_ofsz;
|
||||||
extern cvar_t *cl_vsmoothing;
|
extern cvar_t *cl_vsmoothing;
|
||||||
|
extern cvar_t *cl_bobview;
|
||||||
|
|
||||||
#define CAM_MODE_RELAX 1
|
#define CAM_MODE_RELAX 1
|
||||||
#define CAM_MODE_FOCUS 2
|
#define CAM_MODE_FOCUS 2
|
||||||
|
@ -621,8 +622,11 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams )
|
||||||
|
|
||||||
// refresh position
|
// refresh position
|
||||||
VectorCopy ( pparams->simorg, pparams->vieworg );
|
VectorCopy ( pparams->simorg, pparams->vieworg );
|
||||||
|
|
||||||
|
if (cl_bobview && cl_bobview->value != 0)
|
||||||
|
{
|
||||||
pparams->vieworg[2] += ( bob );
|
pparams->vieworg[2] += ( bob );
|
||||||
VectorAdd( pparams->vieworg, pparams->viewheight, pparams->vieworg );
|
}
|
||||||
|
|
||||||
VectorCopy ( pparams->cl_viewangles, pparams->viewangles );
|
VectorCopy ( pparams->cl_viewangles, pparams->viewangles );
|
||||||
|
|
||||||
|
@ -754,7 +758,10 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams )
|
||||||
{
|
{
|
||||||
view->origin[ i ] += bob * 0.4 * pparams->forward[ i ];
|
view->origin[ i ] += bob * 0.4 * pparams->forward[ i ];
|
||||||
}
|
}
|
||||||
|
if (cl_bobview && cl_bobview->value != 0)
|
||||||
|
{
|
||||||
view->origin[2] += bob;
|
view->origin[2] += bob;
|
||||||
|
}
|
||||||
|
|
||||||
// throw in a little tilt.
|
// throw in a little tilt.
|
||||||
view->angles[YAW] -= bob * 0.5;
|
view->angles[YAW] -= bob * 0.5;
|
||||||
|
|
|
@ -95,6 +95,20 @@ DESCRIPTION INFO_OPTIONS
|
||||||
{ "3.000000" }
|
{ "3.000000" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"cl_bob"
|
||||||
|
{
|
||||||
|
"Weapon bobbing (0.01 default)"
|
||||||
|
{ NUMBER 0.000000 0.010000 }
|
||||||
|
{ "0.01" }
|
||||||
|
}
|
||||||
|
|
||||||
|
"cl_bobview"
|
||||||
|
{
|
||||||
|
"View bobbing (requires weapon bobbing)"
|
||||||
|
{ BOOL }
|
||||||
|
{ "0" }
|
||||||
|
}
|
||||||
|
|
||||||
"cl_weaponswap"
|
"cl_weaponswap"
|
||||||
{
|
{
|
||||||
"Auto drop LMG for better weapon"
|
"Auto drop LMG for better weapon"
|
||||||
|
|
|
@ -12,9 +12,6 @@ lightgamma "2"
|
||||||
fps_override "1"
|
fps_override "1"
|
||||||
gl_vsync "0"
|
gl_vsync "0"
|
||||||
|
|
||||||
//View and weapon bob off
|
|
||||||
cl_bob "0"
|
|
||||||
|
|
||||||
//Network rates for the 21st century
|
//Network rates for the 21st century
|
||||||
rate "30000"
|
rate "30000"
|
||||||
cl_updaterate "100"
|
cl_updaterate "100"
|
||||||
|
|
Loading…
Reference in a new issue