1 #include "targettrigger.qh"
2 spawnfunc(turret_targettrigger);
3 void turret_targettrigger_touch(entity this, entity toucher);
5 void turret_targettrigger_touch(entity this, entity toucher)
7 if (this.cnt > time) return;
8 IL_EACH(g_turrets, it.targetname == this.target,
10 if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS)) continue;
11 if (!it.turret_addtarget) continue;
12 it.turret_addtarget(it, toucher, this);
14 this.cnt = time + 0.5;
17 /*QUAKED turret_targettrigger (.5 .5 .5) ?
19 spawnfunc(turret_targettrigger)
21 if(!autocvar_g_turrets) { delete(this); return; }
25 settouch(this, turret_targettrigger_touch);