]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/lib/warpzone/util_server.qc
Add an intrusive list for warpzones
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / util_server.qc
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                 makevectors (this.angles);
19                 this.movedir = v_forward;
20         }
21         if(this.model == "")
22         {
23                 // It's a box! No need to match with exacttriggers.
24                 this.warpzone_isboxy = 1;
25         }
26         else
27         {
28                 mi = this.mins;
29                 ma = this.maxs;
30                 precache_model(this.model);
31                 _setmodel(this, this.model);
32                 // let mapper-set mins/maxs override the model's bounds if set
33                 if(mi != '0 0 0' || ma != '0 0 0')
34                 {
35                         // It's a box! No need to match with exacttriggers.
36                         this.mins = mi;
37                         this.maxs = ma;
38                         this.warpzone_isboxy = 1;
39                 }
40         }
41         setorigin(this, this.origin);
42         if(this.scale)
43                 setsize(this, this.mins * this.scale, this.maxs * this.scale);
44         else
45                 setsize(this, this.mins, this.maxs);
46         set_movetype(this, MOVETYPE_NONE);
47         this.solid = SOLID_TRIGGER;
48         this.model = "";
49 }