]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/flipflop.qc
improve descriptions, add missing cvar to config
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / flipflop.qc
index b5a2eb8b292d2120abe5dfc798ebd0b81b567c04..af212ff5a42b7449bea067a2c755d4c86374782f 100644 (file)
@@ -1,19 +1,21 @@
+#include "flipflop.qh"
 #ifdef SVQC
 /*QUAKED spawnfunc_trigger_flipflop (.5 .5 .5) (-8 -8 -8) (8 8 8) START_ENABLED
 "Flip-flop" trigger gate... lets only every second trigger event through
 */
-void flipflop_use()
-{SELFPARAM();
-    self.state = !self.state;
-    if(self.state)
-        SUB_UseTargets();
+void flipflop_use(entity this, entity actor, entity trigger)
+{
+    this.state = !this.state;
+    if(this.state)
+        SUB_UseTargets(this, actor, trigger);
 }
 
-void spawnfunc_trigger_flipflop()
-{SELFPARAM();
-    if(self.spawnflags & 1)
-        self.state = 1;
-    self.use = flipflop_use;
-    self.reset = spawnfunc_trigger_flipflop; // perfect resetter
+spawnfunc(trigger_flipflop)
+{
+    if(this.spawnflags & 1)
+        this.state = 1;
+    this.use = flipflop_use;
+    this.reset = spawnfunc_trigger_flipflop; // perfect resetter
 }
+
 #endif