if(t.move_movetype != MOVETYPE_NONE)
continue;
+ // bots can't tell teamed jumppads from normal ones
+ if (this.team)
+ continue;
+
entity e = spawn();
setsize(e, PL_MIN_CONST, PL_MAX_CONST);
e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
else if(n == 1)
{
// exactly one dest - bots love that
- this.enemy = find(NULL, targetname, this.target);
+ if (!this.team)
+ this.enemy = find(NULL, targetname, this.target);
+ else // bots can't tell teamed jumppads from normal ones
+ this.enemy = NULL;
}
else
{
// have to use random selection every single time
this.enemy = NULL;
}
+
}
#ifdef SVQC
else
{
- entity e = spawn();
- setsize(e, PL_MIN_CONST, PL_MAX_CONST);
- e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
- setorigin(e, org);
- e.velocity = this.movedir;
- tracetoss(e, e);
- if (item)
+ if (!this.team)
{
- bool r = (trace_ent == item);
+ entity e = spawn();
+ setsize(e, PL_MIN_CONST, PL_MAX_CONST);
+ e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
+ setorigin(e, org);
+ e.velocity = this.movedir;
+ tracetoss(e, e);
+ if (item)
+ {
+ bool r = (trace_ent == item);
+ delete(e);
+ return r;
+ }
+ if (!(boxesoverlap(this.absmin, this.absmax + eZ * 50, trace_endpos + PL_MIN_CONST, trace_endpos + PL_MAX_CONST)))
+ waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity), e);
delete(e);
- return r;
}
- if (!(boxesoverlap(this.absmin, this.absmax + eZ * 50, trace_endpos + PL_MIN_CONST, trace_endpos + PL_MAX_CONST)))
- waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity), e);
- delete(e);
+ else if (item)
+ return false;
}
defer(this, 0.1, trigger_push_updatelink);