mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-24 13:54:15 +00:00
engine: server: add sv_allow_autoaim cvar
This commit is contained in:
parent
d1f9a8f2db
commit
83d26ad233
@ -472,6 +472,8 @@ extern convar_t sv_userinfo_penalty_multiplier;
|
||||
extern convar_t sv_userinfo_penalty_attempts;
|
||||
extern convar_t sv_fullupdate_penalty_time;
|
||||
extern convar_t sv_log_outofband;
|
||||
extern convar_t sv_allow_autoaim;
|
||||
extern convar_t sv_aim;
|
||||
|
||||
//===========================================================
|
||||
//
|
||||
|
@ -2385,7 +2385,9 @@ static void GAME_EXPORT pfnGetAimVector( edict_t* ent, float speed, float *rgflR
|
||||
|
||||
// try all possible entities
|
||||
VectorCopy( svgame.globals->v_forward, bestdir );
|
||||
bestdist = Cvar_VariableValue( "sv_aim" );
|
||||
if( sv_allow_autoaim.value )
|
||||
bestdist = sv_aim.value;
|
||||
else bestdist = 0;
|
||||
|
||||
check = EDICT_NUM( 1 ); // start at first client
|
||||
for( i = 1; i < svgame.numEntities; i++, check++ )
|
||||
|
@ -23,6 +23,7 @@ CVAR_DEFINE_AUTO( sv_lan, "0", 0, "server is a lan server ( no heartbeat, no aut
|
||||
CVAR_DEFINE_AUTO( sv_lan_rate, "20000.0", 0, "rate for lan server" );
|
||||
CVAR_DEFINE_AUTO( sv_nat, "0", 0, "enable NAT bypass for this server" );
|
||||
CVAR_DEFINE_AUTO( sv_aim, "1", FCVAR_ARCHIVE|FCVAR_SERVER, "auto aiming option" );
|
||||
CVAR_DEFINE_AUTO( sv_allow_autoaim, "0", FCVAR_ARCHIVE|FCVAR_SERVER, "auto aiming option (for HL25 compatibility)" );
|
||||
CVAR_DEFINE_AUTO( sv_unlag, "1", 0, "allow lag compensation on server-side" );
|
||||
CVAR_DEFINE_AUTO( sv_maxunlag, "0.5", 0, "max latency value which can be interpolated (by default ping should not exceed 500 units)" );
|
||||
CVAR_DEFINE_AUTO( sv_unlagpush, "0.0", 0, "interpolation bias for unlag time" );
|
||||
@ -885,6 +886,7 @@ void SV_Init( void )
|
||||
Cvar_RegisterVariable( &sv_fps );
|
||||
Cvar_RegisterVariable( &showtriggers );
|
||||
Cvar_RegisterVariable( &sv_aim );
|
||||
Cvar_RegisterVariable( &sv_allow_autoaim );
|
||||
Cvar_RegisterVariable( &deathmatch );
|
||||
Cvar_RegisterVariable( &coop );
|
||||
Cvar_RegisterVariable( &teamplay );
|
||||
|
Loading…
x
Reference in New Issue
Block a user