From: terencehill Date: Sat, 22 Dec 2018 01:05:18 +0000 (+0100) Subject: Fix aim glitches when bot_ai_aimskill_mouse is set to a value between 0 and 1 X-Git-Tag: xonotic-v0.8.5~1680 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b3528b8e4a4cb7e07a6e4456f6b1c1a4a6f0f79a;p=xonotic%2Fxonotic-data.pk3dir.git Fix aim glitches when bot_ai_aimskill_mouse is set to a value between 0 and 1 --- 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;