Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
flipflop.qc
Go to the documentation of this file.
1
#include "
flipflop.qh
"
2
3
#ifdef SVQC
4
/*QUAKED spawnfunc_trigger_flipflop (.5 .5 .5) (-8 -8 -8) (8 8 8) START_ENABLED
5
"Flip-flop" trigger gate... lets only every second trigger event through
6
*/
7
void
flipflop_use
(
entity
this
,
entity
actor,
entity
trigger)
8
{
9
if
(this.
active
!=
ACTIVE_ACTIVE
)
10
return
;
11
12
this.
state
= !this.
state
;
13
if
(this.
state
)
14
SUB_UseTargets
(
this
, actor, trigger);
15
}
16
17
spawnfunc
(trigger_flipflop)
18
{
19
this.
active
=
ACTIVE_ACTIVE
;
20
this.
state
= (this.
spawnflags
&
START_ENABLED
);
21
this.
use
=
flipflop_use
;
22
this.reset = spawnfunc_trigger_flipflop;
// perfect resetter
23
}
24
#endif
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
spawnflags
int spawnflags
Definition
ammo.qh:15
use
#define use
Definition
csprogsdefs.qh:50
state
int state
Definition
damageeffects.qc:72
active
int active
Definition
defs.qh:34
ACTIVE_ACTIVE
const int ACTIVE_ACTIVE
Definition
defs.qh:37
START_ENABLED
const int START_ENABLED
Definition
defs.qh:6
flipflop_use
void flipflop_use(entity this, entity actor, entity trigger)
Definition
flipflop.qc:7
flipflop.qh
SUB_UseTargets
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition
triggers.qc:344
spawnfunc
#define spawnfunc(id)
Definition
spawnfunc.qh:96
common
mapobjects
trigger
flipflop.qc
Generated on
for Xonotic QuakeC by
1.14.0