7 if(self.killtarget != "")
8 src = find(world, targetname, self.killtarget);
10 dst = find(world, targetname, self.target);
14 objerror("follow: could not find target/killtarget");
20 // already done :P entity must stay
26 objerror("follow: could not find target/killtarget");
29 else if(self.spawnflags & 1)
32 if(self.spawnflags & 2)
34 setattachment(dst, src, self.message);
38 attach_sameorigin(dst, src, self.message);
41 dst.solid = SOLID_NOT; // solid doesn't work with attachment
46 if(self.spawnflags & 2)
48 dst.movetype = MOVETYPE_FOLLOW;
50 // dst.punchangle = '0 0 0'; // keep unchanged
51 dst.view_ofs = dst.origin;
52 dst.v_angle = dst.angles;
56 follow_sameorigin(dst, src);
63 void spawnfunc_misc_follow()
65 InitializeEntity(self, follow_init, INITPRIO_FINDTARGET);