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