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
#include "
oo.qh
"
5
#include "
self.qh
"
6
7
entityclass
(Defer);
8
classfield
(Defer).entity
owner
;
9
classfield
(Defer).void(
entity
) defer_func;
10
12
void
SUB_Remove
(
entity
this
)
13
{
14
delete
(
this
);
15
}
16
17
void
defer_think
(
entity
this
)
18
{
19
setthink
(
this
,
SUB_Remove
);
20
this.
nextthink
=
time
;
21
this.defer_func(this.
owner
);
22
}
23
26
void
defer
(
entity
this
,
float
fdelay,
void
(
entity
) func)
27
{
28
entity
e =
new_pure
(deferred);
29
e.owner =
this
;
30
e.defer_func = func;
31
setthink
(e,
defer_think
);
32
e.nextthink =
time
+ fdelay;
33
}
34
#endif
// GAMEQC
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:26
SUB_Remove
void SUB_Remove(entity this)
Remove entity.
Definition
defer.qh:12
defer_think
void defer_think(entity this)
Definition
defer.qh:17
oo.qh
entityclass
#define entityclass(...)
Definition
oo.qh:51
new_pure
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition
oo.qh:66
classfield
#define classfield(name)
Definition
oo.qh:56
self.qh
setthink
#define setthink(e, f)
lib
defer.qh
Generated on
for Xonotic QuakeC by
1.16.1