mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-24 10:50:48 +01:00
Revert "Always change view rolling on client side."
This reverts commit 1ed4c1d899
.
This commit is contained in:
parent
69f27d43bd
commit
a898d773a1
@ -95,6 +95,7 @@ float g_hud_text_color[3];
|
||||
extern client_sprite_t *GetSpriteList( client_sprite_t *pList, const char *psz, int iRes, int iCount );
|
||||
|
||||
extern cvar_t *sensitivity;
|
||||
qboolean bIsXash;
|
||||
cvar_t *cl_lw = NULL;
|
||||
cvar_t *cl_viewbob = NULL;
|
||||
cvar_t *cl_rollspeed;
|
||||
@ -383,8 +384,17 @@ void CHud::Init( void )
|
||||
m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE );
|
||||
cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" );
|
||||
cl_viewbob = CVAR_CREATE( "cl_viewbob", "0", FCVAR_ARCHIVE );
|
||||
cl_rollangle = gEngfuncs.pfnRegisterVariable( "cl_rollangle", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
|
||||
cl_rollspeed = gEngfuncs.pfnRegisterVariable( "cl_rollspeed", "200", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
|
||||
#if GOLDSOURCE_SUPPORT
|
||||
if( gEngfuncs.pfnGetCvarPointer( "build" ))
|
||||
{
|
||||
bIsXash = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cl_rollangle = gEngfuncs.pfnRegisterVariable( "cl_rollangle", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
|
||||
cl_rollspeed = gEngfuncs.pfnRegisterVariable( "cl_rollspeed", "200", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
|
||||
}
|
||||
#endif
|
||||
m_pSpriteList = NULL;
|
||||
|
||||
// Clear any old HUD list
|
||||
|
@ -313,6 +313,7 @@ void V_AddIdle( struct ref_params_s *pparams )
|
||||
pparams->viewangles[YAW] += v_idlescale * sin( pparams->time * v_iyaw_cycle.value ) * v_iyaw_level.value;
|
||||
}
|
||||
|
||||
extern qboolean bIsXash;
|
||||
extern cvar_t *cl_rollspeed;
|
||||
extern cvar_t *cl_rollangle;
|
||||
|
||||
@ -331,9 +332,14 @@ void V_CalcViewRoll( struct ref_params_s *pparams )
|
||||
viewentity = gEngfuncs.GetEntityByIndex( pparams->viewentity );
|
||||
if( !viewentity )
|
||||
return;
|
||||
|
||||
side = V_CalcRoll( viewentity->angles, pparams->simvel, cl_rollangle->value, cl_rollspeed->value );
|
||||
|
||||
#if GOLDSOURCE_SUPPORT
|
||||
if( bIsXash )
|
||||
side = V_CalcRoll( viewentity->angles, pparams->simvel, pparams->movevars->rollangle, pparams->movevars->rollspeed );
|
||||
else
|
||||
side = V_CalcRoll( viewentity->angles, pparams->simvel, cl_rollangle->value, cl_rollspeed->value );
|
||||
#else
|
||||
side = V_CalcRoll( viewentity->angles, pparams->simvel, pparams->movevars->rollangle, pparams->movevars->rollspeed );
|
||||
#endif
|
||||
pparams->viewangles[ROLL] += side;
|
||||
|
||||
if( pparams->health <= 0 && ( pparams->viewheight[2] != 0 ) )
|
||||
|
Loading…
Reference in New Issue
Block a user