Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
util_server.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void WarpZoneLib_ExactTrigger_Init (entity this, bool unsetmodel)

Function Documentation

◆ WarpZoneLib_ExactTrigger_Init()

void WarpZoneLib_ExactTrigger_Init ( entity this,
bool unsetmodel )

Definition at line 8 of file util_server.qc.

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);
45
46 if (unsetmodel)
47 this.model = "";
48}
const float SOLID_TRIGGER
vector mins
vector maxs
vector origin
float solid
#define MAKE_VECTORS(angles, forward, right, up)
Same as the makevectors builtin but uses the provided locals instead of the v_* globals.
ent angles
Definition ent_cs.qc:146
model
Definition ent_cs.qc:164
float warpzone_isboxy
Definition common.qh:15
vector movedir
Definition viewloc.qh:18
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
const int MOVETYPE_NONE
Definition movetypes.qh:129
float scale
Definition projectile.qc:14
vector
Definition self.qh:96

References angles, entity(), MAKE_VECTORS, maxs, mins, model, movedir, MOVETYPE_NONE, origin, scale, set_movetype(), solid, SOLID_TRIGGER, vector, and warpzone_isboxy.

Referenced by func_ladder_init(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), and spawnfunc().