}
if(this.enemy.target)
- SUB_UseTargets(this.enemy, targ, targ); // TODO: do we need targ as trigger too?
+ SUB_UseTargets(this.enemy, targ, this);
if (targ.flags & FL_PROJECTILE)
{
{
// first calculate a typical start point for the jump
vector org = (this.absmin + this.absmax) * 0.5;
- org_z = this.absmax.z - STAT(PL_MIN, NULL).z;
+ org.z = this.absmax.z - PL_MIN_CONST.z;
if (this.target)
{
#ifdef SVQC
entity e = spawn();
setorigin(e, org);
- setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(e, PL_MIN_CONST, PL_MAX_CONST);
e.velocity = trigger_push_calculatevelocity(org, t, this.height);
tracetoss(e, e);
if(e.move_movetype == MOVETYPE_NONE)
{
entity e = spawn();
setorigin(e, org);
- setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(e, PL_MIN_CONST, PL_MAX_CONST);
e.velocity = this.movedir;
tracetoss(e, e);
waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
void target_push_use(entity this, entity actor, entity trigger)
{
+ if(trigger.classname == "trigger_push" || trigger == this)
+ return; // WTF, why is this a thing
+
jumppad_push(this, actor);
}
void target_push_remove(entity this)
{
- if(this.classname)
- strunzone(this.classname);
- this.classname = string_null;
+ //if(this.classname)
+ //strunzone(this.classname);
+ //this.classname = string_null;
if(this.targetname)
strunzone(this.targetname);