X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fcounter.qc;h=d5811e479ed2bec89677d1d0bde1634ae28acfbf;hb=f2741730af3cbdb03dc3a3e1bd10c1b881f5a75d;hp=bf1d9b2da76f672c4f554ed9d262e3cb1624cbd1;hpb=9c09a961b8674e3a808889d3f34d71855018d3bc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/counter.qc b/qcsrc/common/triggers/trigger/counter.qc index bf1d9b2da..d5811e479 100644 --- a/qcsrc/common/triggers/trigger/counter.qc +++ b/qcsrc/common/triggers/trigger/counter.qc @@ -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)