entity bot = M_ARGV(0, entity);
entity target = M_ARGV(1, entity);
- return SAME_SQUAD(bot, target) || (STAT(DROP, target) == DROP_TRANSPORT);
+ return SAME_SQUAD(bot, target) || (STAT(DROP, bot) != DROP_LANDED) || (STAT(DROP, target) == DROP_TRANSPORT);
}
MUTATOR_HOOKFUNCTION(br, TurretValidateTarget)
br_event_vehicle_time = time;
spawn_vehicle();
}
+
+ if(ring)
+ {
+ float current_radius = ring_calculate_current_radius(ring);
+
+ IL_EACH(g_items, it.bot_pickup, {
+ if(vdist(it.origin - ring.origin, >, current_radius))
+ it.bot_pickup = false;
+ });
+ }
}
void(entity this) havocbot_role_br_reviving;
return false;
}
+bool br_bot_ignore_in_ring(entity this)
+{
+ if(!ring)
+ return false;
+
+ if(vlen(this.origin - ring.origin) > ring_calculate_current_radius(ring))
+ return true;
+
+ return false;
+}
+
void havocbot_goalrating_br_findplayers(entity this, float ratingscale)
{
if(!IN_SQUAD(this))
{
IL_EACH(g_waypoints, vdist(it.origin - org, <, sradius)
&& vdist(it.origin - org, >, max(100, sradius - range))
- && !(it.wpflags & WAYPOINTFLAG_TELEPORT),
+ && !(it.wpflags & WAYPOINTFLAG_TELEPORT)
+ && !br_bot_ignore_in_ring(it),
{
if(vdist(it.origin - this.wp_goal_prev0.origin, <, range * 1.5))
f = 0.1;
continue;
if(vdist(vec2(it.velocity), >, autocvar_sv_maxspeed * 2))
continue;
+ if(br_bot_ignore_in_ring(it))
+ continue;
// rate only visible enemies
/*