Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
targettrigger.qc File Reference
#include "targettrigger.qh"
Include dependency graph for targettrigger.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 spawnfunc (turret_targettrigger)
void turret_targettrigger_touch (entity this, entity toucher)

Function Documentation

◆ spawnfunc()

spawnfunc ( turret_targettrigger )

Definition at line 22 of file targettrigger.qc.

23{
25 {
26 delete(this);
27 return;
28 }
29
30 InitTrigger(this);
31
33}
#define settouch(e, f)
Definition self.qh:73
void InitTrigger(entity this)
Definition subs.qc:552
bool autocvar_g_turrets
Definition sv_turrets.qh:5
void turret_targettrigger_touch(entity this, entity toucher)

References autocvar_g_turrets, InitTrigger(), settouch, and turret_targettrigger_touch().

◆ turret_targettrigger_touch()

void turret_targettrigger_touch ( entity this,
entity toucher )

Definition at line 7 of file targettrigger.qc.

8{
9 if (this.cnt > time)
10 return;
11 IL_EACH(g_turrets, it.targetname == this.target,
12 {
13 if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS) || !it.turret_addtarget)
14 continue;
15 it.turret_addtarget(it, toucher, this);
16 });
17 this.cnt = time + 0.5;
18}
float cnt
Definition powerups.qc:24
float time
#define IL_EACH(this, cond, body)
IntrusiveList g_turrets

References cnt, entity(), g_turrets, IL_EACH, time, and toucher.

Referenced by spawnfunc().