]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/trigger/flipflop.qc
Hopefully fix remote compilation
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / flipflop.qc
1 #ifdef SVQC
2 /*QUAKED spawnfunc_trigger_flipflop (.5 .5 .5) (-8 -8 -8) (8 8 8) START_ENABLED
3 "Flip-flop" trigger gate... lets only every second trigger event through
4 */
5 void flipflop_use()
6 {SELFPARAM();
7     self.state = !self.state;
8     if(self.state)
9         SUB_UseTargets();
10 }
11
12 spawnfunc(trigger_flipflop)
13 {
14     if(this.spawnflags & 1)
15         this.state = 1;
16     this.use = flipflop_use;
17     this.reset = spawnfunc_trigger_flipflop; // perfect resetter
18 }
19
20 #endif