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