Browse Source

Merge branch 'master' into mobile_hacks

mobile_hacks
Andrey Akhmichin 2 years ago
parent
commit
42611c9ec7
No known key found for this signature in database
GPG Key ID: BE329F7886439BC8
  1. 16
      cl_dll/hud.cpp
  2. 12
      cl_dll/view.cpp

16
cl_dll/hud.cpp

@ -99,7 +99,6 @@ float g_hud_text_color[3];
extern client_sprite_t *GetSpriteList( client_sprite_t *pList, const char *psz, int iRes, int iCount ); extern client_sprite_t *GetSpriteList( client_sprite_t *pList, const char *psz, int iRes, int iCount );
extern cvar_t *sensitivity; extern cvar_t *sensitivity;
qboolean bIsXash;
cvar_t *cl_lw = NULL; cvar_t *cl_lw = NULL;
cvar_t *cl_viewbob = NULL; cvar_t *cl_viewbob = NULL;
cvar_t *cl_rollspeed; cvar_t *cl_rollspeed;
@ -387,18 +386,9 @@ void CHud::Init( void )
m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE );
m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE );
cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" );
cl_viewbob = CVAR_CREATE( "cl_bobtilt", "0", FCVAR_ARCHIVE ); cl_viewbob = CVAR_CREATE( "cl_viewbob", "0", FCVAR_ARCHIVE );
#if GOLDSOURCE_SUPPORT cl_rollangle = gEngfuncs.pfnRegisterVariable( "cl_rollangle", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
if( gEngfuncs.pfnGetCvarPointer( "build" )) cl_rollspeed = gEngfuncs.pfnRegisterVariable( "cl_rollspeed", "200", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
{
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; m_pSpriteList = NULL;
#ifdef MOBILE_HACKS #ifdef MOBILE_HACKS

12
cl_dll/view.cpp

@ -313,7 +313,6 @@ void V_AddIdle( struct ref_params_s *pparams )
pparams->viewangles[YAW] += v_idlescale * sin( pparams->time * v_iyaw_cycle.value ) * v_iyaw_level.value; 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_rollspeed;
extern cvar_t *cl_rollangle; extern cvar_t *cl_rollangle;
@ -332,14 +331,9 @@ void V_CalcViewRoll( struct ref_params_s *pparams )
viewentity = gEngfuncs.GetEntityByIndex( pparams->viewentity ); viewentity = gEngfuncs.GetEntityByIndex( pparams->viewentity );
if( !viewentity ) if( !viewentity )
return; return;
#if GOLDSOURCE_SUPPORT
if( bIsXash ) side = V_CalcRoll( viewentity->angles, pparams->simvel, cl_rollangle->value, cl_rollspeed->value );
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; pparams->viewangles[ROLL] += side;
if( pparams->health <= 0 && ( pparams->viewheight[2] != 0 ) ) if( pparams->health <= 0 && ( pparams->viewheight[2] != 0 ) )

Loading…
Cancel
Save