+#include "minelayer.qh"
#ifndef IMPLEMENTATION
CLASS(MineLayer, Weapon)
/* ammotype */ ATTRIB(MineLayer, ammo_field, .int, ammo_rockets);
newmine.cnt = this.cnt;
newmine.flags = this.flags;
IL_PUSH(g_projectiles, newmine);
+ IL_PUSH(g_bot_dodge, newmine);
delete(this);
mine.cnt = (WEP_CVAR(minelayer, lifetime) - WEP_CVAR(minelayer, lifetime_countdown));
mine.flags = FL_PROJECTILE;
IL_PUSH(g_projectiles, mine);
+ IL_PUSH(g_bot_dodge, mine);
mine.missile_flags = MIF_SPLASH | MIF_ARC | MIF_PROXY;
if(mine.cnt > 0) { mine.cnt += time; }
IL_EACH(g_mines, it.realowner == actor,
{
entity mine = it;
- FOREACH_ENTITY_FLOAT(bot_attack, true,
+ IL_EACH(g_bot_targets, it.bot_attack,
{
float d = vlen(it.origin + (it.mins + it.maxs) * 0.5 - mine.origin);
d = bound(0, edgedamage + (coredamage - edgedamage) * sqrt(1 - d * recipricoledgeradius), 10000);
if(skill > 9) // normal players only do this for the target they are tracking
{
entity mine = it;
- FOREACH_ENTITY_FLOAT(bot_attack, true,
+ IL_EACH(g_bot_targets, it.bot_attack,
{
if((v_forward * normalize(mine.origin - it.origin) < 0.1)
&& desirabledamage > 0.1 * coredamage