Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
delay.qc
Go to the documentation of this file.
1
#include "
delay.qh
"
2
3
#ifdef SVQC
4
void
delay_delayeduse
(
entity
this
)
5
{
6
SUB_UseTargets
(
this
, this.
enemy
, this.
goalentity
);
7
this.
enemy
= this.
goalentity
=
NULL
;
8
}
9
10
void
delay_use
(
entity
this
,
entity
actor,
entity
trigger)
11
{
12
if
(this.
active
!=
ACTIVE_ACTIVE
)
13
return
;
14
15
this.
enemy
= actor;
16
this.
goalentity
= trigger;
17
setthink
(
this
,
delay_delayeduse
);
18
this.
nextthink
=
time
+ this.
wait
;
19
}
20
21
void
delay_reset
(
entity
this
)
22
{
23
this.
enemy
= this.
goalentity
=
NULL
;
24
setthink
(
this
,
func_null
);
25
this.
nextthink
= 0;
26
this.
active
=
ACTIVE_ACTIVE
;
27
}
28
29
spawnfunc
(trigger_delay)
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
}
38
#endif
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
wait
float wait
Definition
items.qc:17
time
float time
Definition
csprogsdefs.qc:16
nextthink
float nextthink
Definition
csprogsdefs.qc:125
use
#define use
Definition
csprogsdefs.qh:50
active
int active
Definition
defs.qh:34
ACTIVE_ACTIVE
const int ACTIVE_ACTIVE
Definition
defs.qh:37
delay_delayeduse
void delay_delayeduse(entity this)
Definition
delay.qc:4
delay_use
void delay_use(entity this, entity actor, entity trigger)
Definition
delay.qc:10
delay_reset
void delay_reset(entity this)
Definition
delay.qc:21
delay.qh
SUB_UseTargets
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition
triggers.qc:344
goalentity
entity goalentity
Definition
viewloc.qh:16
func_null
var void func_null()
NULL
#define NULL
Definition
post.qh:14
setthink
#define setthink(e, f)
spawnfunc
#define spawnfunc(id)
Definition
spawnfunc.qh:96
enemy
entity enemy
Definition
sv_ctf.qh:153
common
mapobjects
trigger
delay.qc
Generated on
for Xonotic QuakeC by
1.14.0