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

Go to the source code of this file.

Functions

void monoflop_fixed_use (entity this, entity actor, entity trigger)
void monoflop_reset (entity this)
void monoflop_think (entity this)
void monoflop_use (entity this, entity actor, entity trigger)
 spawnfunc (trigger_monoflop)

Function Documentation

◆ monoflop_fixed_use()

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

Definition at line 15 of file monoflop.qc.

16{
17 if(this.state)
18 return;
19 this.nextthink = time + this.wait;
20 this.state = 1;
21 this.enemy = actor;
22 SUB_UseTargets(this, actor, trigger);
23}
float wait
Definition items.qc:17
float time
float nextthink
int state
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344
entity enemy
Definition sv_ctf.qh:153

References enemy, entity(), nextthink, state, SUB_UseTargets(), time, and wait.

Referenced by spawnfunc().

◆ monoflop_reset()

void monoflop_reset ( entity this)

Definition at line 31 of file monoflop.qc.

32{
33 this.state = 0;
34 this.nextthink = 0;
35}

References entity(), nextthink, and state.

Referenced by spawnfunc().

◆ monoflop_think()

void monoflop_think ( entity this)

Definition at line 25 of file monoflop.qc.

26{
27 this.state = 0;
28 SUB_UseTargets(this, this.enemy, NULL);
29}
#define NULL
Definition post.qh:14

References enemy, entity(), NULL, state, and SUB_UseTargets().

Referenced by spawnfunc().

◆ monoflop_use()

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

Definition at line 6 of file monoflop.qc.

7{
8 this.nextthink = time + this.wait;
9 this.enemy = actor;
10 if(this.state)
11 return;
12 this.state = 1;
13 SUB_UseTargets(this, actor, trigger);
14}

References enemy, entity(), nextthink, state, SUB_UseTargets(), time, and wait.

Referenced by spawnfunc().

◆ spawnfunc()

spawnfunc ( trigger_monoflop )

Definition at line 37 of file monoflop.qc.

38{
39 if(!this.wait)
40 this.wait = 1;
41 if(this.spawnflags & MONOFLOP_FIXED)
43 else
44 this.use = monoflop_use;
46 this.state = 0;
47 this.reset = monoflop_reset;
48}
int spawnflags
Definition ammo.qh:15
#define use
void monoflop_reset(entity this)
Definition monoflop.qc:31
void monoflop_think(entity this)
Definition monoflop.qc:25
void monoflop_use(entity this, entity actor, entity trigger)
Definition monoflop.qc:6
void monoflop_fixed_use(entity this, entity actor, entity trigger)
Definition monoflop.qc:15
const int MONOFLOP_FIXED
Definition monoflop.qh:4
#define setthink(e, f)

References MONOFLOP_FIXED, monoflop_fixed_use(), monoflop_reset(), monoflop_think(), monoflop_use(), setthink, spawnflags, state, use, and wait.