]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/g_subs.qh
Add a hook to team change function, will come in handy soon
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_subs.qh
1 #ifndef G_SUBS_H
2 #define G_SUBS_H
3
4 void SUB_NullThink();
5
6 void()  SUB_CalcMoveDone;
7 void() SUB_CalcAngleMoveDone;
8 //void() SUB_UseTargets;
9
10 spawnfunc(info_null);
11
12 void setanim(entity e, vector anim, float looping, float override, float restart);
13
14 void updateanim(entity e);
15
16
17
18 /*
19 ==================
20 SUB_Friction
21
22 Applies some friction to self
23 ==================
24 */
25 .float friction;
26 void SUB_Friction ();
27
28 /*
29 ==================
30 SUB_VanishOrRemove
31
32 Makes client invisible or removes non-client
33 ==================
34 */
35 void SUB_VanishOrRemove (entity ent);
36
37 void SUB_SetFade_Think ();
38
39 /*
40 ==================
41 SUB_SetFade
42
43 Fade 'ent' out when time >= 'when'
44 ==================
45 */
46 void SUB_SetFade (entity ent, float when, float fadetime);
47
48 /*
49 =============
50 SUB_CalcMove
51
52 calculate self.velocity and self.nextthink to reach dest from
53 self.origin traveling at speed
54 ===============
55 */
56 void SUB_CalcMoveDone ();
57
58 .float platmovetype_turn;
59 void SUB_CalcMove_controller_think ();
60
61 void SUB_CalcMove_controller_setbezier (entity controller, vector org, vector control, vector dest);
62
63 void SUB_CalcMove_controller_setlinear (entity controller, vector org, vector dest);
64
65 void SUB_CalcMove_Bezier (vector tcontrol, vector tdest, float tspeedtype, float tspeed, void() func);
66
67 void SUB_CalcMove (vector tdest, float tspeedtype, float tspeed, void() func);
68
69 void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void() func);
70
71 /*
72 =============
73 SUB_CalcAngleMove
74
75 calculate self.avelocity and self.nextthink to reach destangle from
76 self.angles rotating
77
78 The calling function should make sure self.think is valid
79 ===============
80 */
81 void SUB_CalcAngleMoveDone ();
82
83 // FIXME: I fixed this function only for rotation around the main axes
84 void SUB_CalcAngleMove (vector destangle, float tspeedtype, float tspeed, void() func);
85
86 void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void() func);
87
88 /*
89 ==================
90 main
91
92 unused but required by the engine
93 ==================
94 */
95 void main ();
96
97 // Misc
98
99 /*
100 ==================
101 traceline_antilag
102
103 A version of traceline that must be used by SOLID_SLIDEBOX things that want to hit SOLID_CORPSE things with a trace attack
104 Additionally it moves players back into the past before the trace and restores them afterward.
105 ==================
106 */
107 void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag, float wz);
108 void traceline_antilag_force (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
109 void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
110 void tracebox_antilag (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag);
111 void WarpZone_traceline_antilag_force (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
112 void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
113 void WarpZone_tracebox_antilag (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag);
114
115 float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomonsters, entity forent, float stopatentity, entity ignorestopatentity); // returns the number of traces done, for benchmarking
116
117 void traceline_inverted (vector v1, vector v2, float nomonsters, entity forent, float stopatentity, entity ignorestopatentity);
118
119 /*
120 ==================
121 findbetterlocation
122
123 Returns a point at least 12 units away from walls
124 (useful for explosion animations, although the blast is performed where it really happened)
125 Ripped from DPMod
126 ==================
127 */
128 vector findbetterlocation (vector org, float mindist);
129
130 /*
131 ==================
132 Angc used for animations
133 ==================
134 */
135
136
137 float angc (float a1, float a2);
138
139 .string lodtarget1;
140 .string lodtarget2;
141 .string lodmodel1;
142 .string lodmodel2;
143 .float lodmodelindex0;
144 .float lodmodelindex1;
145 .float lodmodelindex2;
146 .float loddistance1;
147 .float loddistance2;
148
149 float LOD_customize();
150
151 void LOD_uncustomize();
152
153 void LODmodel_attach();
154
155 void ApplyMinMaxScaleAngles(entity e);
156
157 void SetBrushEntityModel();
158
159 void SetBrushEntityModelNoLOD();
160
161 /*
162 ================
163 InitTrigger
164 ================
165 */
166
167 void SetMovedir(entity this);
168
169 void InitTrigger();
170
171 void InitSolidBSPTrigger();
172
173 float InitMovingBrushTrigger();
174 #endif