X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fflipflop.qc;h=e4923bdf545bdf8cb43740858ffc384071191539;hb=8ba1f6c672361186033b8bebc3be677ac94bd4da;hp=12d8a5940a245a7b6f55a11626df815803c1b39c;hpb=fd8a3cfbe15df4e9854dbb288157fe863276a696;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/flipflop.qc b/qcsrc/common/triggers/trigger/flipflop.qc index 12d8a5940..e4923bdf5 100644 --- a/qcsrc/common/triggers/trigger/flipflop.qc +++ b/qcsrc/common/triggers/trigger/flipflop.qc @@ -2,18 +2,19 @@ /*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() +void flipflop_use(entity this, entity actor, entity trigger) { - self.state = !self.state; - if(self.state) - SUB_UseTargets(); + this.state = !this.state; + if(this.state) + SUB_UseTargets(this, actor, trigger); } -void spawnfunc_trigger_flipflop() +spawnfunc(trigger_flipflop) { - if(self.spawnflags & 1) - self.state = 1; - self.use = flipflop_use; - self.reset = spawnfunc_trigger_flipflop; // perfect resetter + if(this.spawnflags & 1) + this.state = 1; + this.use = flipflop_use; + this.reset = spawnfunc_trigger_flipflop; // perfect resetter } + #endif