diff --git a/engine/server/server.h b/engine/server/server.h index 7667381a..aa05c6d5 100644 --- a/engine/server/server.h +++ b/engine/server/server.h @@ -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; //=========================================================== // diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index 7462ac95..1a732292 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -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++ ) diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 9b30ab17..8040d60e 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -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 );