Xonotic
util_server.qc
Go to the documentation of this file.
1
#include "
util_server.qh
"
2
3
#include "
common.qh
"
4
5
#if defined(CSQC)
6
#elif defined(MENUQC)
7
#elif defined(SVQC)
8
#include <
lib/csqcmodel/sv_model.qh
>
9
#endif
10
#include "
common.qh
"
11
12
void
WarpZoneLib_ExactTrigger_Init
(
entity
this
)
13
{
14
vector
mi, ma;
15
if
(this.
movedir
==
'0 0 0'
)
16
if
(this.
angles
!=
'0 0 0'
)
17
{
18
vector
forward, _r, _u;
19
MAKE_VECTORS(this.
angles
, forward, _r, _u);
20
this.
movedir
= forward;
21
}
22
if
(this.
model
==
""
)
23
{
24
// It's a box! No need to match with exacttriggers.
25
this.
warpzone_isboxy
= 1;
26
}
27
else
28
{
29
mi = this.
mins
;
30
ma = this.
maxs
;
31
precache_model(this.
model
);
32
_setmodel(
this
, this.
model
);
33
// let mapper-set mins/maxs override the model's bounds if set
34
if
(mi !=
'0 0 0'
|| ma !=
'0 0 0'
)
35
{
36
// It's a box! No need to match with exacttriggers.
37
this.
mins
= mi;
38
this.
maxs
= ma;
39
this.
warpzone_isboxy
= 1;
40
}
41
}
42
setorigin
(
this
, this.
origin
);
43
if
(this.
scale
)
44
setsize(
this
, this.
mins
* this.
scale
, this.
maxs
* this.scale);
45
else
46
setsize(
this
, this.
mins
, this.
maxs
);
47
set_movetype
(
this
,
MOVETYPE_NONE
);
48
this.
solid
=
SOLID_TRIGGER
;
49
this.
model
=
""
;
50
}
MOVETYPE_NONE
float MOVETYPE_NONE
Definition:
progsdefs.qc:246
util_server.qh
entity
entity() spawn
common.qh
maxs
vector maxs
Definition:
csprogsdefs.qc:113
origin
origin
Definition:
ent_cs.qc:114
sv_model.qh
model
string model
Definition:
csprogsdefs.qc:108
movedir
vector movedir
Definition:
progsdefs.qc:203
mins
vector mins
Definition:
csprogsdefs.qc:113
scale
float scale
Definition:
projectile.qc:14
vector
vector(float skel, float bonenum) _skel_get_boneabs_hidden
warpzone_isboxy
float warpzone_isboxy
Definition:
common.qh:12
SOLID_TRIGGER
const float SOLID_TRIGGER
Definition:
csprogsdefs.qc:245
setorigin
setorigin(ent, v)
angles
vector angles
Definition:
csprogsdefs.qc:104
WarpZoneLib_ExactTrigger_Init
void WarpZoneLib_ExactTrigger_Init(entity this)
Definition:
util_server.qc:12
set_movetype
void set_movetype(entity this, int mt)
solid
float solid
Definition:
csprogsdefs.qc:99
lib
warpzone
util_server.qc
Generated on Thu Mar 17 2022 17:26:29 for Xonotic by
1.8.13