float dist = max(10, vlen(v - shotorg));
float maxfiredeviation = 1000 / (dist - 9) - 0.35;
- if (!shot_accurate)
- maxfiredeviation *= 1.6;
- else
- maxfiredeviation *= 1 + bound(0, (10 - (skill + this.bot_aimskill)) * 0.3, 3);
- maxfiredeviation = min(autocvar_bot_ai_aimskill_firetolerance_maxdegrees, maxfiredeviation);
+ float f = (shot_accurate) ? 1 : 1.6;
+ f += bound(0, (10 - (skill + this.bot_aimskill)) * 0.3, 3);
+ maxfiredeviation = min(90, maxfiredeviation * f);
if (applygravity && this.bot_aimtarg)
{
float autocvar_bot_ai_aimskill_blendrate;
int autocvar_bot_ai_aimskill_firetolerance;
-float autocvar_bot_ai_aimskill_firetolerance_maxdegrees;
float autocvar_bot_ai_aimskill_fixedrate;
float autocvar_bot_ai_aimskill_mouse;
float autocvar_bot_ai_aimskill_offset;
set bot_ai_aimskill_blendrate 2 "How much correction will be applied to the aiming angle"
set bot_ai_aimskill_fixedrate 15 "Distance based scale from which correction will be applied to the aiming angle"
set bot_ai_aimskill_firetolerance 1 "enable fire tolerance"
-set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
set bot_ai_keyboard_distance 250 "Keyboard emulation is disabled after this distance to the goal"
set bot_ai_keyboard_threshold 0.57