Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / relay_if.qc
1 #ifdef SVQC
2 void trigger_relay_if_use()
3 {
4         float n;
5         n = self.count;
6
7         // TODO make this generic AND faster than nextent()ing through all, if somehow possible
8         n = (cvar_string(self.netname) == cvar_string(self.message));
9         if(self.spawnflags & 1)
10                 n = !n;
11
12         if(n)
13                 SUB_UseTargets();
14 }
15
16 void spawnfunc_trigger_relay_if()
17 {
18         self.use = trigger_relay_if_use;
19 }
20 #endif