Xonotic
relay.qc
Go to the documentation of this file.
1 #include "relay.qh"
2 #ifdef SVQC
3 
4 void relay_use(entity this, entity actor, entity trigger)
5 {
6  if(this.active != ACTIVE_ACTIVE)
7  return;
8 
9  SUB_UseTargets(this, actor, trigger);
10 }
11 
12 /*QUAKED spawnfunc_trigger_relay (.5 .5 .5) (-8 -8 -8) (8 8 8)
13 This fixed size trigger cannot be touched, it can only be fired by other events. It can contain killtargets, targets, delays, and messages.
14 */
15 spawnfunc(trigger_relay)
16 {
17  this.active = ACTIVE_ACTIVE;
18  this.use = relay_use;
19  this.reset = spawnfunc_trigger_relay; // this spawnfunc resets fully
20 }
21 
22 spawnfunc(target_relay)
23 {
24  spawnfunc_trigger_relay(this);
25 }
26 
27 spawnfunc(target_delay)
28 {
29  if(!this.wait)
30  this.wait = 1;
31  if(!this.delay)
32  this.delay = this.wait; // fall back to quake 3 field
33  spawnfunc_trigger_relay(this);
34 }
35 #endif
entity() spawn
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition: triggers.qc:366
spawnfunc(info_player_attacker)
Definition: sv_assault.qc:283
float wait
Definition: subs.qh:39
float delay
Definition: subs.qh:38
const int ACTIVE_ACTIVE
Definition: defs.qh:37
int active
Definition: defs.qh:34
#define use
Definition: csprogsdefs.qh:50