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 FOREACH_ENTITY_STRING_ORDERED(targetname, this.target, {
9 if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS)) continue;
10 if (!it.turret_addtarget) continue;
11 it.turret_addtarget(it, toucher, this);
13 this.cnt = time + 0.5;
16 /*QUAKED turret_targettrigger (.5 .5 .5) ?
18 spawnfunc(turret_targettrigger)
20 if(!autocvar_g_turrets) { delete(this); return; }
24 settouch(this, turret_targettrigger_touch);