Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
util_server.qc File Reference
#include "util_server.qh"
#include "common.qh"
Include dependency graph for util_server.qc:
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 12 of file util_server.qc.

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 this.solid = SOLID_TRIGGER; // before setsize to ensure area grid linking
44 if(this.scale)
45 setsize(this, this.mins * this.scale, this.maxs * this.scale);
46 else
47 setsize(this, this.mins, this.maxs);
49
50 if (unsetmodel)
51 this.model = "";
52}
const float SOLID_TRIGGER
vector mins
vector maxs
vector origin
#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:121
model
Definition ent_cs.qc:139
solid
Definition ent_cs.qc:165
float warpzone_isboxy
Definition common.qh:12
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:92

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().