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