]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/counter.qc
Merge branch 'master' into terencehill/hud_fixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / counter.qc
index bf1d9b2da76f672c4f554ed9d262e3cb1624cbd1..d5811e479ed2bec89677d1d0bde1634ae28acfbf 100644 (file)
@@ -1,6 +1,6 @@
 #ifdef SVQC
 void counter_use()
-{
+{SELFPARAM();
        self.count -= 1;
        if (self.count < 0)
                return;
@@ -23,10 +23,10 @@ void counter_use()
        }
 }
 
-void counter_reset()
+void counter_reset(entity this)
 {
-       self.count = self.cnt;
-       multi_reset();
+       this.count = this.cnt;
+       multi_reset(this);
 }
 
 /*QUAKED spawnfunc_trigger_counter (.5 .5 .5) ? nomessage
@@ -36,7 +36,7 @@ If nomessage is not set, t will print "1 more.. " etc when triggered and "sequen
 
 After the counter has been triggered "count" times (default 2), it will fire all of it's targets and remove itself.
 */
-void spawnfunc_trigger_counter()
+spawnfunc(trigger_counter)
 {
        self.wait = -1;
        if (!self.count)