-void spawnfunc_turret_targettrigger();
-void turret_targettrigger_touch();
-
-void turret_targettrigger_touch()
-{SELFPARAM();
- entity e;
- if (self.cnt > time) return;
- entity oldself = this;
-
- e = find(world, targetname, self.target);
- while (e)
+#include "targettrigger.qh"
+spawnfunc(turret_targettrigger);
+void turret_targettrigger_touch(entity this, entity toucher);
+
+void turret_targettrigger_touch(entity this, entity toucher)
+{
+ if (this.cnt > time) return;
+ IL_EACH(g_turrets, it.targetname == this.target,