local entity head = findradius(self.origin, 256);
while(head)
{
print(sprintf("found a %s\n", head.classname));
head = head.chain;
}
findradius should only be called once, unlike find. it returns a linked list rather than the next entity.
naturally, this sucks with recursion, like stuff that does T_RadiusDamage in its th_die function, as this can corrupt the .chain linked list.
while(head)
{
print(sprintf("found a %s\n", head.classname));
head = head.chain;
}
findradius should only be called once, unlike find. it returns a linked list rather than the next entity.
naturally, this sucks with recursion, like stuff that does T_RadiusDamage in its th_die function, as this can corrupt the .chain linked list.
Comment