From b3528b8e4a4cb7e07a6e4456f6b1c1a4a6f0f79a Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 22 Dec 2018 02:05:18 +0100 Subject: [PATCH] Fix aim glitches when bot_ai_aimskill_mouse is set to a value between 0 and 1 --- qcsrc/server/bot/default/aim.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index 1f570eaf5..8cc2664d2 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -307,7 +307,8 @@ void bot_aimdir(entity this, vector v, float maxfiredeviation) r = max(fixedrate, blendrate); //this.v_angle = this.v_angle + diffang * bound(frametime, r * frametime * (2+skill*skill*0.05-random()*0.05*(10-skill)), 1); this.v_angle = this.v_angle + diffang * bound(delta_t, r * delta_t * (2 + ((skill + this.bot_mouseskill) ** 3) * 0.005 - random()), 1); - this.v_angle = this.v_angle * bound(0,autocvar_bot_ai_aimskill_mouse,1) + desiredang * bound(0,(1-autocvar_bot_ai_aimskill_mouse),1); + this.v_angle += diffang * bound(0, (1 - autocvar_bot_ai_aimskill_mouse), 1); + //this.v_angle = this.v_angle + diffang * bound(0, r * frametime * (skill * 0.5 + 2), 1); //this.v_angle = this.v_angle + diffang * (1/ blendrate); this.v_angle_z = 0; -- 2.39.2