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