Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
targettrigger.qc
Go to the documentation of this file.
1#include "targettrigger.qh"
2
3#ifdef SVQC
4
5spawnfunc(turret_targettrigger);
7
9{
10 if (this.cnt > time) return;
11 IL_EACH(g_turrets, it.targetname == this.target,
12 {
13 if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS)) continue;
14 if (!it.turret_addtarget) continue;
15 it.turret_addtarget(it, toucher, this);
16 });
17 this.cnt = time + 0.5;
18}
19
20/*QUAKED turret_targettrigger (.5 .5 .5) ?
21*/
22spawnfunc(turret_targettrigger)
23{
24 if(!autocvar_g_turrets) { delete(this); return; }
25
26 InitTrigger(this);
27
29}
30
31#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float cnt
Definition powerups.qc:24
float time
#define IL_EACH(this, cond, body)
entity entity toucher
Definition self.qh:72
#define settouch(e, f)
Definition self.qh:73
#define spawnfunc(id)
Definition spawnfunc.qh:96
void InitTrigger(entity this)
Definition subs.qc:553
bool autocvar_g_turrets
Definition sv_turrets.qh:5
IntrusiveList g_turrets
void turret_targettrigger_touch(entity this, entity toucher)