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

Go to the source code of this file.

Functions

void delay_delayeduse (entity this)
void delay_reset (entity this)
void delay_use (entity this, entity actor, entity trigger)
 spawnfunc (trigger_delay)

Function Documentation

◆ delay_delayeduse()

void delay_delayeduse ( entity this)

Definition at line 4 of file delay.qc.

5{
6 SUB_UseTargets(this, this.enemy, this.goalentity);
7 this.enemy = this.goalentity = NULL;
8}
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344
entity goalentity
Definition viewloc.qh:16
#define NULL
Definition post.qh:14
entity enemy
Definition sv_ctf.qh:153

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

Referenced by delay_use().

◆ delay_reset()

void delay_reset ( entity this)

Definition at line 21 of file delay.qc.

22{
23 this.enemy = this.goalentity = NULL;
24 setthink(this, func_null);
25 this.nextthink = 0;
26 this.active = ACTIVE_ACTIVE;
27}
float nextthink
int active
Definition defs.qh:34
const int ACTIVE_ACTIVE
Definition defs.qh:37
var void func_null()
#define setthink(e, f)

References active, ACTIVE_ACTIVE, enemy, entity(), func_null(), goalentity, nextthink, NULL, and setthink.

Referenced by spawnfunc().

◆ delay_use()

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

Definition at line 10 of file delay.qc.

11{
12 if(this.active != ACTIVE_ACTIVE)
13 return;
14
15 this.enemy = actor;
16 this.goalentity = trigger;
18 this.nextthink = time + this.wait;
19}
float wait
Definition items.qc:17
float time
void delay_delayeduse(entity this)
Definition delay.qc:4

References active, ACTIVE_ACTIVE, delay_delayeduse(), enemy, entity(), goalentity, nextthink, setthink, time, and wait.

Referenced by spawnfunc().

◆ spawnfunc()

spawnfunc ( trigger_delay )

Definition at line 29 of file delay.qc.

30{
31 if(!this.wait)
32 this.wait = 1;
33
34 this.use = delay_use;
35 this.reset = delay_reset;
36 this.active = ACTIVE_ACTIVE;
37}
#define use
void delay_use(entity this, entity actor, entity trigger)
Definition delay.qc:10
void delay_reset(entity this)
Definition delay.qc:21

References active, ACTIVE_ACTIVE, delay_reset(), delay_use(), use, and wait.