Added cvar 'dz_silent_aim'
This commit is contained in:
parent
e43cea56f8
commit
f38678d727
|
@ -15,6 +15,7 @@ DECL_CVAR(tracers);
|
|||
DECL_CVAR(clmove);
|
||||
DECL_CVAR(watermark);
|
||||
DECL_CVAR(watermark_rainbow);
|
||||
DECL_CVAR(silent_aim);
|
||||
|
||||
bool cvars_init(void) {
|
||||
REGISTER_CVAR(bhop, 1);
|
||||
|
@ -27,6 +28,7 @@ bool cvars_init(void) {
|
|||
REGISTER_CVAR(clmove, 0);
|
||||
REGISTER_CVAR(watermark, 1);
|
||||
REGISTER_CVAR(watermark_rainbow, 1);
|
||||
REGISTER_CVAR(silent_aim, 1);
|
||||
if (IsCS16()) {
|
||||
REGISTER_CVAR(tracers, 0);
|
||||
} else {
|
||||
|
|
|
@ -90,8 +90,6 @@ void aimbot(usercmd_t* cmd) {
|
|||
/* TODO: Add setting for lowest health */
|
||||
vec3_t best_delta = get_closest_delta(engine_viewangles);
|
||||
if (!vec_is_zero(best_delta)) {
|
||||
/* NOTE: We can divide the best delta here to add smoothing */
|
||||
|
||||
engine_viewangles.x += best_delta.x;
|
||||
engine_viewangles.y += best_delta.y;
|
||||
engine_viewangles.z += best_delta.z;
|
||||
|
@ -100,8 +98,10 @@ void aimbot(usercmd_t* cmd) {
|
|||
cmd->buttons &= ~IN_ATTACK;
|
||||
}
|
||||
|
||||
if (CVAR_ON(silent_aim)) {
|
||||
vec_copy(cmd->viewangles, engine_viewangles);
|
||||
|
||||
/* NOTE: Uncomment to disable silent aim */
|
||||
/* i_engine->SetViewAngles(engine_viewangles); */
|
||||
} else {
|
||||
i_engine->SetViewAngles(engine_viewangles);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ DECL_CVAR_EXTERN(tracers);
|
|||
DECL_CVAR_EXTERN(clmove);
|
||||
DECL_CVAR_EXTERN(watermark);
|
||||
DECL_CVAR_EXTERN(watermark_rainbow);
|
||||
DECL_CVAR_EXTERN(silent_aim);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue