+#include "aim.qh"
+#include "../_all.qh"
+
+#include "bot.qh"
+
+#include "../mutators/mutators_include.qh"
// traces multiple trajectories to find one that will impact the target
// 'end' vector is the place it aims for,
if(e.flags & FL_NOTARGET)
return false;
- checkentity = e;
- if(MUTATOR_CALLHOOK(BotShouldAttack))
+ if(MUTATOR_CALLHOOK(BotShouldAttack, e))
return false;
return true;
hf = self.dphitcontentsmask;
self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
- shotspeed *= g_weaponspeedfactor;
- shotspeedupward *= g_weaponspeedfactor;
+ shotspeed *= W_WeaponSpeedFactor();
+ shotspeedupward *= W_WeaponSpeedFactor();
if (!shotspeed)
{
- dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
+ LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
shotspeed = 1000000;
}
if (!maxshottime)
{
- dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
+ LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
maxshottime = 1;
}
makevectors(self.v_angle);