Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
defer.qh
Go to the documentation of this file.
1
#pragma once
2
3
#ifdef GAMEQC
4
5
#include "
oo.qh
"
6
#include "
self.qh
"
7
8
entityclass
(Defer);
9
classfield
(Defer).entity
owner
;
10
classfield
(Defer).void(
entity
) defer_func;
11
13
void
SUB_Remove
(
entity
this
)
14
{
15
delete
(
this
);
16
}
17
18
void
defer_think
(
entity
this
)
19
{
20
setthink
(
this
,
SUB_Remove
);
21
this.
nextthink
=
time
;
22
this.defer_func(this.
owner
);
23
}
24
29
void
defer
(
entity
this
,
float
fdelay,
void
(
entity
) func)
30
{
31
entity
e =
new_pure
(deferred);
32
e.owner =
this
;
33
e.defer_func = func;
34
setthink
(e,
defer_think
);
35
e.nextthink =
time
+ fdelay;
36
}
37
38
#endif
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
owner
entity owner
Definition
main.qh:87
time
float time
Definition
csprogsdefs.qc:16
nextthink
float nextthink
Definition
csprogsdefs.qc:125
defer
void defer(entity this, float fdelay, void(entity) func)
Execute func() after time + fdelay.
Definition
defer.qh:29
SUB_Remove
void SUB_Remove(entity this)
Remove entity.
Definition
defer.qh:13
defer_think
void defer_think(entity this)
Definition
defer.qh:18
oo.qh
entityclass
#define entityclass(...)
Definition
oo.qh:52
new_pure
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition
oo.qh:67
classfield
#define classfield(name)
Definition
oo.qh:57
self.qh
setthink
#define setthink(e, f)
lib
defer.qh
Generated on
for Xonotic QuakeC by
1.14.0