]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mapobjects/trigger/relay_if.qc
Rename triggers to mapobjects
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / relay_if.qc
1 #include "relay_if.qh"
2 #ifdef SVQC
3 void trigger_relay_if_use(entity this, entity actor, entity trigger)
4 {
5         int n = this.count;
6
7         // TODO make this generic AND faster than nextent()ing through all, if somehow possible
8         n = (cvar_string(this.netname) == cvar_string(this.message));
9         if(this.spawnflags & RELAYIF_NEGATE)
10                 n = !n;
11
12         if(n)
13                 SUB_UseTargets(this, actor, trigger);
14 }
15
16 spawnfunc(trigger_relay_if)
17 {
18         this.use = trigger_relay_if_use;
19 }
20 #endif