X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fflipflop.qc;h=af212ff5a42b7449bea067a2c755d4c86374782f;hb=d492869ab1f18e05121529b7bcffcb637d13994c;hp=e039173fb01ea752cbfae4361181cb65895282c4;hpb=32ca966802c45c4c231210c2d8776bc3f4135dc2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/flipflop.qc b/qcsrc/common/triggers/trigger/flipflop.qc index e039173fb..af212ff5a 100644 --- a/qcsrc/common/triggers/trigger/flipflop.qc +++ b/qcsrc/common/triggers/trigger/flipflop.qc @@ -1,22 +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(); 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 } -void _spawnfunc_trigger_flipflop() { SELFPARAM(); spawnfunc_trigger_flipflop(this); } #endif