]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/targettrigger.qc
Merge branch 'master' into martin-t/dmgtext
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / targettrigger.qc
index ca94f2b4e1fbee55b2a219b1959d2f5bd8c9c94f..d64616f50354ca6ad092c4a0b1dae10a6ef8881b 100644 (file)
@@ -1,10 +1,15 @@
+#include "targettrigger.qh"
+
+#ifdef SVQC
+
 spawnfunc(turret_targettrigger);
 void turret_targettrigger_touch(entity this, entity toucher);
 
 void turret_targettrigger_touch(entity this, entity toucher)
 {
     if (this.cnt > time) return;
-    FOREACH_ENTITY_STRING_ORDERED(targetname, this.target, {
+    IL_EACH(g_turrets, it.targetname == this.target,
+    {
         if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS)) continue;
         if (!it.turret_addtarget) continue;
         it.turret_addtarget(it, toucher, this);
@@ -22,3 +27,5 @@ spawnfunc(turret_targettrigger)
 
     settouch(this, turret_targettrigger_touch);
 }
+
+#endif