]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/targettrigger.qc
Merge branch 'TimePath/modules'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / targettrigger.qc
index 4828bf0b34c17b078126affea19477e9d7929014..f2a97d4a12529e6fd576819d7509b5bd55597937 100644 (file)
@@ -1,13 +1,14 @@
+#include "targettrigger.qh"
 spawnfunc(turret_targettrigger);
-void turret_targettrigger_touch(entity this);
+void turret_targettrigger_touch(entity this, entity toucher);
 
-void turret_targettrigger_touch(entity this)
+void turret_targettrigger_touch(entity this, entity toucher)
 {
     if (this.cnt > time) return;
     FOREACH_ENTITY_STRING_ORDERED(targetname, this.target, {
         if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS)) continue;
         if (!it.turret_addtarget) continue;
-        WITHSELF(it, it.turret_addtarget(other, this));
+        it.turret_addtarget(it, toucher, this);
     });
     this.cnt = time + 0.5;
 }
@@ -16,9 +17,9 @@ void turret_targettrigger_touch(entity this)
 */
 spawnfunc(turret_targettrigger)
 {
-    if(!autocvar_g_turrets) { remove(this); return; }
+    if(!autocvar_g_turrets) { delete(this); return; }
 
-    WITHSELF(this, InitTrigger());
+    InitTrigger(this);
 
     settouch(this, turret_targettrigger_touch);
 }