[HL25] Backport "sv_allow_autoaim" CVAR functionality
This commit is contained in:
parent
d6635d2f71
commit
c567ed8a51
3 changed files with 4 additions and 2 deletions
|
@ -479,6 +479,7 @@ void GameDLLInit()
|
|||
|
||||
g_psv_gravity = CVAR_GET_POINTER("sv_gravity");
|
||||
g_psv_aim = CVAR_GET_POINTER("sv_aim");
|
||||
g_psv_allow_autoaim = CVAR_GET_POINTER("sv_allow_autoaim");
|
||||
g_footsteps = CVAR_GET_POINTER("mp_footsteps");
|
||||
g_psv_cheats = CVAR_GET_POINTER("sv_cheats");
|
||||
|
||||
|
|
|
@ -46,5 +46,6 @@ extern cvar_t sv_allowbunnyhopping;
|
|||
// Engine Cvars
|
||||
inline cvar_t* g_psv_gravity;
|
||||
inline cvar_t* g_psv_aim;
|
||||
inline cvar_t* g_psv_allow_autoaim;
|
||||
inline cvar_t* g_footsteps;
|
||||
inline cvar_t* g_psv_cheats;
|
||||
|
|
|
@ -4374,7 +4374,7 @@ Vector CBasePlayer::GetAutoaimVector(float flDelta)
|
|||
// m_vecAutoAim = m_vecAutoAim * 0.99;
|
||||
|
||||
// Don't send across network if sv_aim is 0
|
||||
if (g_psv_aim->value != 0)
|
||||
if (g_psv_aim->value != 0 && g_psv_allow_autoaim != 0)
|
||||
{
|
||||
if (m_vecAutoAim.x != m_lastx ||
|
||||
m_vecAutoAim.y != m_lasty)
|
||||
|
@ -4406,7 +4406,7 @@ Vector CBasePlayer::AutoaimDeflection(Vector& vecSrc, float flDist, float flDelt
|
|||
edict_t* bestent;
|
||||
TraceResult tr;
|
||||
|
||||
if (g_psv_aim->value == 0)
|
||||
if (g_psv_aim->value == 0 || g_psv_allow_autoaim->value == 0)
|
||||
{
|
||||
m_fOnTarget = false;
|
||||
return g_vecZero;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue