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{
24 if(!autocvar_g_turrets) { delete(this); return; }
25
26 InitTrigger(this);
27
29}
#define settouch(e, f)
Definition self.qh:73
void InitTrigger(entity this)
Definition subs.qc:553
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 8 of file targettrigger.qc.

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}
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().