From: terencehill Date: Sat, 22 Dec 2018 17:38:29 +0000 (+0100) Subject: Make the new bot_ai_aimskill_mouse formula work like before X-Git-Tag: xonotic-v0.8.5~1679 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f7ee19875849309c6778d76d870d9bb82f14d37;p=xonotic%2Fxonotic-data.pk3dir.git Make the new bot_ai_aimskill_mouse formula work like before --- diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index 8cc2664d2..633fdf243 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -306,11 +306,9 @@ void bot_aimdir(entity this, vector v, float maxfiredeviation) blendrate = autocvar_bot_ai_aimskill_blendrate; 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 += diffang * bound(0, (1 - autocvar_bot_ai_aimskill_mouse), 1); + r = bound(delta_t, r * delta_t * (2 + ((skill + this.bot_mouseskill) ** 3) * 0.005 - random()), 1); + this.v_angle += diffang * (r + (1 - r) * 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; this.v_angle_y = this.v_angle.y - floor(this.v_angle.y / 360) * 360; //dprint(" turn:", vtos(this.v_angle));