entity oldother = other;
- FOREACH_ENTITY_FLOAT(solid, SOLID_TRIGGER,
+ for (entity e = findradius(0.5 * (this.absmin + this.absmax), 0.5 * vlen(this.absmax - this.absmin)); e; e = e.chain)
{
- if(it != this && it.move_touch)
- if(it.move_nomonsters != MOVE_NOMONSTERS && it.move_nomonsters != MOVE_WORLDONLY)
- if(boxesoverlap(it.absmin, it.absmax, this.absmin, this.absmax))
+ if(e.solid == SOLID_TRIGGER && e != this)
+ if(e.move_nomonsters != MOVE_NOMONSTERS && e.move_nomonsters != MOVE_WORLDONLY)
+ if(e.move_touch && boxesoverlap(e.absmin, e.absmax, this.absmin, this.absmax))
{
other = this;
trace_fraction = 1;
trace_inwater = false;
trace_inopen = true;
- trace_endpos = it.move_origin;
+ trace_endpos = e.move_origin;
trace_plane_normal = '0 0 1';
trace_plane_dist = 0;
trace_ent = this;
- WITH(entity, self, it, it.move_touch());
+ WITH(entity, self, e, e.move_touch());
}
- });
+ }
other = oldother;
}
{
entity e;
for(e = findradius((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1); e; e = e.chain)
- if(e.isplayermodel || e.classname == "csqcprojectile")
+ if(e.classname == "csqcprojectile")
{
vector emin = e.absmin, emax = e.absmax;
if(this.solid == SOLID_BSP)