X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fmonoflop.qc;fp=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fmonoflop.qc;h=0000000000000000000000000000000000000000;hb=be37ea91fb3bbd1a6fa4f0b70b32d1ea95343ad4;hp=a67baca16a2f152d69877823eee144bfd076724a;hpb=c1afbb3db4d2b8f1ca73b331ebe00cd276a99f1b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/monoflop.qc b/qcsrc/common/triggers/trigger/monoflop.qc deleted file mode 100644 index a67baca16..000000000 --- a/qcsrc/common/triggers/trigger/monoflop.qc +++ /dev/null @@ -1,49 +0,0 @@ -#include "monoflop.qh" -#ifdef SVQC -/*QUAKED spawnfunc_trigger_monoflop (.5 .5 .5) (-8 -8 -8) (8 8 8) -"Mono-flop" trigger gate... turns one trigger event into one "on" and one "off" event, separated by a delay of "wait" -*/ -void monoflop_use(entity this, entity actor, entity trigger) -{ - this.nextthink = time + this.wait; - this.enemy = actor; - if(this.state) - return; - this.state = 1; - SUB_UseTargets(this, actor, trigger); -} -void monoflop_fixed_use(entity this, entity actor, entity trigger) -{ - if(this.state) - return; - this.nextthink = time + this.wait; - this.state = 1; - this.enemy = actor; - SUB_UseTargets(this, actor, trigger); -} - -void monoflop_think(entity this) -{ - this.state = 0; - SUB_UseTargets(this, this.enemy, NULL); -} - -void monoflop_reset(entity this) -{ - this.state = 0; - this.nextthink = 0; -} - -spawnfunc(trigger_monoflop) -{ - if(!this.wait) - this.wait = 1; - if(this.spawnflags & 1) - this.use = monoflop_fixed_use; - else - this.use = monoflop_use; - setthink(this, monoflop_think); - this.state = 0; - this.reset = monoflop_reset; -} -#endif