entity e = spawn();
setsize(e, PL_MIN_CONST, PL_MAX_CONST);
e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
- e.velocity = trigger_push_calculatevelocity(org, t, this.height);
+ e.velocity = trigger_push_calculatevelocity(org, t, this.height, e);
+
+ if(item)
+ {
+ setorigin(e, org);
+ tracetoss(e, e);
+ bool r = (trace_ent == item);
+ delete(e);
+ return r;
+ }
+
vel = e.velocity;
vector best_target = '0 0 0';
vector best_org = '0 0 0';