#include "../../weapons/weaponsystem.qh"
-#include "../../mutators/all.qh"
+#include "../../mutators/_mod.qh"
// traces multiple trajectories to find one that will impact the target
// 'end' vector is the place it aims for,
return targorigin + targvelocity * (shotdelay + vlen(targorigin - shotorg) / shotspeed);
}
-bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
+bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
{
float f, r, hf, distanceratio;
vector v;
shotspeedupward *= W_WeaponSpeedFactor(this);
if (!shotspeed)
{
- LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " shotspeed is zero!\n");
+ LOG_TRACE("bot_aim: WARNING: weapon ", this.(weaponentity).m_weapon.m_name, " shotspeed is zero!");
shotspeed = 1000000;
}
if (!maxshottime)
{
- LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " maxshottime is zero!\n");
+ LOG_TRACE("bot_aim: WARNING: weapon ", this.(weaponentity).m_weapon.m_name, " maxshottime is zero!");
maxshottime = 1;
}
makevectors(this.v_angle);