Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
flipflop.qc File Reference
#include "flipflop.qh"
Include dependency graph for flipflop.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void flipflop_use (entity this, entity actor, entity trigger)
 spawnfunc (trigger_flipflop)

Function Documentation

◆ flipflop_use()

void flipflop_use ( entity this,
entity actor,
entity trigger )

Definition at line 7 of file flipflop.qc.

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}
int state
int active
Definition defs.qh:34
const int ACTIVE_ACTIVE
Definition defs.qh:37
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344

References active, ACTIVE_ACTIVE, entity(), state, and SUB_UseTargets().

Referenced by spawnfunc().

◆ spawnfunc()

spawnfunc ( trigger_flipflop )

Definition at line 17 of file flipflop.qc.

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}
int spawnflags
Definition ammo.qh:15
#define use
const int START_ENABLED
Definition defs.qh:6
void flipflop_use(entity this, entity actor, entity trigger)
Definition flipflop.qc:7

References active, ACTIVE_ACTIVE, flipflop_use(), spawnflags, START_ENABLED, state, and use.