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