Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
util_server.qc
Go to the documentation of this file.
1
#include "
util_server.qh
"
2
3
#include "
common.qh
"
4
#ifdef SVQC
5
#include <
lib/csqcmodel/sv_model.qh
>
6
#endif
7
8
void
WarpZoneLib_ExactTrigger_Init
(
entity
this
,
bool
unsetmodel)
9
{
10
vector
mi, ma;
11
if
(this.
movedir
==
'0 0 0'
12
&& this.
angles
!=
'0 0 0'
)
13
{
14
vector
forward, _r, _u;
15
MAKE_VECTORS
(this.
angles
, forward, _r, _u);
16
this.
movedir
= forward;
17
}
18
if
(this.
model
==
""
)
19
{
20
// It's a box! No need to match with exacttriggers.
21
this.
warpzone_isboxy
= 1;
22
}
23
else
24
{
25
mi = this.
mins
;
26
ma = this.
maxs
;
27
precache_model(this.
model
);
28
_setmodel(
this
, this.
model
);
29
// let mapper-set mins/maxs override the model's bounds if set
30
if
(mi !=
'0 0 0'
|| ma !=
'0 0 0'
)
31
{
32
// It's a box! No need to match with exacttriggers.
33
this.
mins
= mi;
34
this.
maxs
= ma;
35
this.
warpzone_isboxy
= 1;
36
}
37
}
38
setorigin(
this
, this.
origin
);
39
this.
solid
=
SOLID_TRIGGER
;
// before setsize to ensure area grid linking
40
if
(this.
scale
)
41
setsize(
this
, this.
mins
* this.
scale
, this.
maxs
* this.scale);
42
else
43
setsize(
this
, this.
mins
, this.
maxs
);
44
set_movetype
(
this
,
MOVETYPE_NONE
);
45
46
if
(unsetmodel)
47
this.
model
=
""
;
48
}
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
SOLID_TRIGGER
const float SOLID_TRIGGER
Definition
csprogsdefs.qc:249
mins
vector mins
Definition
csprogsdefs.qc:117
maxs
vector maxs
Definition
csprogsdefs.qc:117
origin
vector origin
Definition
csprogsdefs.qc:105
solid
float solid
Definition
csprogsdefs.qc:103
MAKE_VECTORS
#define MAKE_VECTORS(angles, forward, right, up)
Same as the makevectors builtin but uses the provided locals instead of the v_* globals.
Definition
deglobalization.qh:85
angles
ent angles
Definition
ent_cs.qc:146
model
model
Definition
ent_cs.qc:164
common.qh
warpzone_isboxy
float warpzone_isboxy
Definition
common.qh:15
movedir
vector movedir
Definition
viewloc.qh:18
set_movetype
void set_movetype(entity this, int mt)
Definition
movetypes.qc:4
MOVETYPE_NONE
const int MOVETYPE_NONE
Definition
movetypes.qh:129
scale
float scale
Definition
projectile.qc:14
vector
vector
Definition
self.qh:96
sv_model.qh
WarpZoneLib_ExactTrigger_Init
void WarpZoneLib_ExactTrigger_Init(entity this, bool unsetmodel)
Definition
util_server.qc:8
util_server.qh
lib
warpzone
util_server.qc
Generated on
for Xonotic QuakeC by
1.16.1