mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-28 15:45:46 +03:00
engine: add sv_allow_autoaim cvar for HL25 DLL compatibility (#1000)
add sv_allow_autoaim cvar for HL25 DLL compatibility
This commit is contained in:
parent
7fcec97af4
commit
3f19bc1d3e
@ -1802,7 +1802,14 @@ void EXT_FUNC PF_aim_I(edict_t *ent, float speed, float *rgflReturn)
|
||||
bestdir[1] = dir[1];
|
||||
bestdir[2] = dir[2];
|
||||
bestdir[0] = dir[0];
|
||||
bestdist = sv_aim.value;
|
||||
if (sv_allow_autoaim.value)
|
||||
{
|
||||
bestdist = sv_aim.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
bestdist = 0.0f;
|
||||
}
|
||||
|
||||
for (int i = 1; i < g_psv.num_edicts; i++)
|
||||
{
|
||||
|
@ -283,6 +283,7 @@ extern rehlds_server_t g_rehlds_sv;
|
||||
extern cvar_t sv_lan;
|
||||
extern cvar_t sv_lan_rate;
|
||||
extern cvar_t sv_aim;
|
||||
extern cvar_t sv_allow_autoaim;
|
||||
|
||||
extern cvar_t sv_skycolor_r;
|
||||
extern cvar_t sv_skycolor_g;
|
||||
|
@ -114,6 +114,7 @@ int giNextUserMsg = 64;
|
||||
cvar_t sv_lan = { "sv_lan", "0", 0, 0.0f, NULL };
|
||||
cvar_t sv_lan_rate = { "sv_lan_rate", "20000.0", 0, 0.0f, NULL };
|
||||
cvar_t sv_aim = { "sv_aim", "1", FCVAR_SERVER | FCVAR_ARCHIVE , 0.0f, NULL };
|
||||
cvar_t sv_allow_autoaim = { "sv_allow_autoaim", "1", FCVAR_SERVER | FCVAR_ARCHIVE, 0.0f, NULL };
|
||||
|
||||
cvar_t sv_skycolor_r = { "sv_skycolor_r", "0", 0, 0.0f, NULL };
|
||||
cvar_t sv_skycolor_g = { "sv_skycolor_g", "0", 0, 0.0f, NULL };
|
||||
@ -8024,6 +8025,9 @@ void SV_Init(void)
|
||||
Cvar_RegisterVariable(&sv_visiblemaxplayers);
|
||||
Cvar_RegisterVariable(&sv_password);
|
||||
Cvar_RegisterVariable(&sv_aim);
|
||||
#ifdef REHLDS_FIXES
|
||||
Cvar_RegisterVariable(&sv_allow_autoaim);
|
||||
#endif
|
||||
Cvar_RegisterVariable(&violence_hblood);
|
||||
Cvar_RegisterVariable(&violence_ablood);
|
||||
Cvar_RegisterVariable(&violence_hgibs);
|
||||
|
Loading…
Reference in New Issue
Block a user