From: terencehill Date: Sat, 19 Aug 2017 15:24:27 +0000 (+0200) Subject: Remove a wasted normalize call (v is already normalized) X-Git-Tag: xonotic-v0.8.5~2520 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3e88d2beabfecae91c21f9ffb87a32685f3df370;p=xonotic%2Fxonotic-data.pk3dir.git Remove a wasted normalize call (v is already normalized) --- diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index feb19afe1..8f2abb3f8 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -307,7 +307,7 @@ float bot_aimdir(entity this, vector v, float maxfiredeviation) //dprint("e ", vtos(diffang), " < ", ftos(maxfiredeviation), "\n"); // decide whether to fire this time - if ((normalize(v) * shotdir) >= cos(maxfiredeviation * DEG2RAD)) + if (v * shotdir >= cos(maxfiredeviation * DEG2RAD)) if(vdist(trace_endpos-shotorg, <, 500 + 500 * bound(0, skill + this.bot_aggresskill, 10)) || random()*random()>bound(0,(skill+this.bot_aggresskill)*0.05,1)) this.bot_firetimer = time + bound(0.1, 0.5-(skill+this.bot_aggresskill)*0.05, 0.5); //traceline(shotorg,shotorg+shotdir*1000,false,NULL);