RandomSelection_Init();
FOREACH_WORD(teleporter.noise, true,
{
- RandomSelection_Add(NULL, 0, it, 1, 1);
+ RandomSelection_AddString(it, 1, 1);
});
thesound = RandomSelection_chosen_string;
}
if(check_tdeath(player, locout, '0 0 0', '0 0 0'))
p = 0;
}
- RandomSelection_Add(it, 0, string_null, (it.cnt ? it.cnt : 1), p);
+ RandomSelection_AddEnt(it, (it.cnt ? it.cnt : 1), p);
});
e = RandomSelection_chosen_ent;
}
entity Teleport_Find(vector mi, vector ma)
{
- entity e;
- for(e = NULL; (e = find(e, classname, "trigger_teleport")); )
- if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, NULL))
- return e;
+ IL_EACH(g_teleporters, WarpZoneLib_BoxTouchesBrush(mi, ma, it, NULL),
+ {
+ return it;
+ });
return NULL;
}