]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mapobjects/trigger/relay.qc
Merge branch 'master' into Juhu/strafehud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / relay.qc
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