]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mapobjects/subs.qh
Merge branch 'master' into Mario/stats_eloranking
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / subs.qh
1 #pragma once
2 #include "defs.qh"
3
4 .float friction;
5 void SUB_Friction(entity this);
6
7 void SUB_NullThink(entity this);
8
9 /*
10 ==================
11 SUB_VanishOrRemove
12
13 Makes client invisible or removes non-client
14 ==================
15 */
16 void SUB_VanishOrRemove(entity ent);
17
18 void SUB_SetFade_Think(entity this);
19
20 /*
21 ==================
22 SUB_SetFade
23
24 Fade 'ent' out when time >= 'when'
25 ==================
26 */
27 .float fade_rate;
28 void SUB_SetFade(entity ent, float when, float fading_time);
29
30 .vector         finaldest, finalangle;          //plat.qc stuff
31 .void(entity this) think1;
32 .float state;
33 .float          t_length, t_width;
34
35 .vector destvec;
36 .vector destvec2;
37
38 .float  delay;
39 .float  wait;
40 .float  lip;
41 .float  speed;
42 .float  sounds;
43 .string  platmovetype;
44 .float platmovetype_start, platmovetype_end;
45
46 //entity activator;
47
48 .string killtarget;
49
50 .vector pos1, pos2;
51 .vector mangle;
52
53 .string target2;
54 .string target3;
55 .string target4;
56 .string curvetarget;
57 .float target_random;
58 .float trigger_reverse;
59
60 // Keys player is holding
61 .float itemkeys;
62 // message delay for func_door locked by keys and key locks
63 // this field is used on player entities
64 .float key_door_messagetime;
65
66 .vector dest1, dest2;
67
68 .entity move_controller;
69
70 const int TSPEED_TIME = -1;
71 const int TSPEED_LINEAR = 0;
72 const int TSPEED_START = 1;
73 const int TSPEED_END = 2;
74 // TODO average too?
75
76 #ifdef CSQC
77 // this stuff is defined in the server side engine VM, so we must define it separately here
78 .float takedamage;
79 const int DAMAGE_NO = 0;
80 const int DAMAGE_YES = 1;
81 const int DAMAGE_AIM = 2;
82
83 .string         noise, noise1, noise2, noise3;  // contains names of wavs to play
84
85 .float          max_health;             // players maximum health is stored here
86 #endif
87
88 #ifdef SVQC
89 spawnfunc(info_null);
90 #endif
91
92 /*
93 =============
94 SUB_CalcMove
95
96 calculate this.velocity and this.nextthink to reach dest from
97 this.origin traveling at speed
98 ===============
99 */
100 void SUB_CalcMoveDone(entity this);
101
102 .float platmovetype_turn;
103 void SUB_CalcMove_controller_think (entity this);
104
105 void SUB_CalcMove_controller_setbezier (entity controller, vector org, vector control, vector dest);
106
107 void SUB_CalcMove_controller_setlinear (entity controller, vector org, vector dest);
108
109 void SUB_CalcMove_Bezier (entity this, vector tcontrol, vector tdest, float tspeedtype, float tspeed, void(entity this) func);
110
111 void SUB_CalcMove (entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func);
112
113 void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void(entity this) func);
114
115 #ifdef SVQC
116 void ApplyMinMaxScaleAngles(entity e);
117
118 void SetBrushEntityModel(entity this);
119
120 void SetBrushEntityModelNoLOD(entity this);
121
122 int autocvar_loddebug;
123 .string lodtarget1;
124 .string lodtarget2;
125 .string lodmodel1;
126 .string lodmodel2;
127 .float lodmodelindex0;
128 .float lodmodelindex1;
129 .float lodmodelindex2;
130 .float loddistance1;
131 .float loddistance2;
132
133 bool LOD_customize(entity this, entity client);
134
135 void LOD_uncustomize(entity this);
136
137 void LODmodel_attach(entity this);
138 #endif
139
140 /*
141 =============
142 SUB_CalcAngleMove
143
144 calculate this.avelocity and this.nextthink to reach destangle from
145 this.angles rotating
146
147 The calling function should make sure this.think is valid
148 ===============
149 */
150 void SUB_CalcAngleMoveDone (entity this);
151
152 // FIXME: I fixed this function only for rotation around the main axes
153 void SUB_CalcAngleMove (entity this, vector destangle, float tspeedtype, float tspeed, void(entity this) func);
154
155 void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func);
156
157 /*
158 ================
159 InitTrigger
160 ================
161 */
162
163 #ifdef SVQC
164 void SetMovedir(entity this);
165
166 void InitTrigger(entity this);
167
168 void InitSolidBSPTrigger(entity this);
169
170 bool InitMovingBrushTrigger(entity this);
171 #endif