Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
lazy.qh
Go to the documentation of this file.
1
#pragma once
2
3
#include "
oo.qh
"
4
5
CLASS
(
Lazy
,
Object
)
6
ATTRIB
(
Lazy
, m_get,
entity
());
7
CONSTRUCTOR
(
Lazy
,
entity
() _compute)
8
{
9
this.m_get = _compute;
10
}
11
ENDCLASS
(
Lazy
)
12
13
#define LAZY(id) __lazy_##id
14
#define LAZY_NEW(id, compute) \
15
entity LAZY(id)() \
16
{ \
17
static bool done; \
18
static entity it; \
19
if (!done) \
20
{ \
21
it = compute; \
22
done = true; \
23
} \
24
return it; \
25
}
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Lazy
Definition
lazy.qh:5
Lazy::ATTRIB
ATTRIB(Lazy, m_get, entity())
Lazy::Lazy
Lazy(entity() _compute)
Definition
lazy.qh:7
Object
oo.qh
CLASS
#define CLASS(...)
Definition
oo.qh:149
ENDCLASS
#define ENDCLASS(cname)
Definition
oo.qh:286
CONSTRUCTOR
#define CONSTRUCTOR(cname,...)
Definition
oo.qh:217
lib
lazy.qh
Generated on
for Xonotic QuakeC by
1.16.1