+#include "follow.qh"
// the way this entity works makes it no use to CSQC, as it removes itself instantly
#ifdef SVQC
objerror(this, "follow: could not find target/killtarget");
return;
}
- else if(this.spawnflags & 1)
+ else if(this.spawnflags & FOLLOW_ATTACH)
{
// attach
- if(this.spawnflags & 2)
+ if(this.spawnflags & FOLLOW_LOCAL)
{
setattachment(dst, src, this.message);
}
}
dst.solid = SOLID_NOT; // solid doesn't work with attachment
- remove(this);
+ delete(this);
}
else
{
- if(this.spawnflags & 2)
+ if(this.spawnflags & FOLLOW_LOCAL)
{
- dst.movetype = MOVETYPE_FOLLOW;
+ set_movetype(dst, MOVETYPE_FOLLOW);
dst.aiment = src;
// dst.punchangle = '0 0 0'; // keep unchanged
dst.view_ofs = dst.origin;
follow_sameorigin(dst, src);
}
- remove(this);
+ delete(this);
}
}