Xonotic
subs.qh
Go to the documentation of this file.
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;
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;
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
65 
66 .vector dest1, dest2;
67 
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 
104 
105 void SUB_CalcMove_controller_setbezier (entity controller, vector org, vector control, vector dest);
106 
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, bool with_lod);
119 
120 int autocvar_loddebug;
121 .string lodtarget1;
122 .string lodtarget2;
123 .string lodmodel1;
124 .string lodmodel2;
125 .float lodmodelindex0;
126 .float lodmodelindex1;
127 .float lodmodelindex2;
128 .float loddistance1;
129 .float loddistance2;
130 
131 bool LOD_customize(entity this, entity client);
132 
133 void LOD_uncustomize(entity this);
134 
135 void LODmodel_attach(entity this);
136 #endif
137 
138 /*
139 =============
140 SUB_CalcAngleMove
141 
142 calculate this.avelocity and this.nextthink to reach destangle from
143 this.angles rotating
144 
145 The calling function should make sure this.think is valid
146 ===============
147 */
148 void SUB_CalcAngleMoveDone (entity this);
149 
150 // FIXME: I fixed this function only for rotation around the main axes
151 void SUB_CalcAngleMove (entity this, vector destangle, float tspeedtype, float tspeed, void(entity this) func);
152 
153 void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func);
154 
155 /*
156 ================
157 InitTrigger
158 ================
159 */
160 
161 #ifdef SVQC
162 void SetMovedir(entity this);
163 
164 void InitTrigger(entity this);
165 
166 void InitSolidBSPTrigger(entity this);
167 
168 bool InitMovingBrushTrigger(entity this);
169 #endif
float state
Definition: subs.qh:32
vector destvec2
Definition: subs.qh:36
float target_random
Definition: subs.qh:57
vector dest
Definition: jumppads.qh:41
void SUB_CalcMove_controller_setlinear(entity controller, vector org, vector dest)
Definition: subs.qc:181
float speed
Definition: subs.qh:41
string killtarget
Definition: subs.qh:48
string noise
Definition: progsdefs.qc:209
vector destvec
Definition: subs.qh:35
void SUB_CalcMove(entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
Definition: subs.qc:256
float platmovetype_turn
Definition: subs.qh:102
float platmovetype_end
Definition: subs.qh:44
string target3
Definition: subs.qh:54
entity() spawn
float DAMAGE_AIM
Definition: progsdefs.qc:284
entity move_controller
Definition: subs.qh:68
const int TSPEED_LINEAR
Definition: subs.qh:71
void SUB_CalcAngleMove(entity this, vector destangle, float tspeedtype, float tspeed, void(entity this) func)
Definition: subs.qc:331
float key_door_messagetime
Definition: subs.qh:64
void SUB_CalcMove_controller_think(entity this)
Definition: subs.qc:106
string noise2
Definition: progsdefs.qc:209
spawnfunc(info_player_attacker)
Definition: sv_assault.qc:283
string platmovetype
Definition: subs.qh:43
void SUB_CalcMove_Bezier(entity this, vector tcontrol, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
Definition: subs.qc:194
float trigger_reverse
Definition: subs.qh:58
float friction
Definition: subs.qh:4
void SUB_CalcMoveEnt(entity ent, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
Definition: subs.qc:305
string noise3
Definition: progsdefs.qc:209
int lodmodelindex0
const int TSPEED_START
Definition: subs.qh:72
void SUB_SetFade(entity ent, float when, float fading_time)
Definition: subs.qc:77
void SUB_CalcMove_controller_setbezier(entity controller, vector org, vector control, vector dest)
Definition: subs.qc:166
string curvetarget
Definition: subs.qh:56
vector dest2
Definition: subs.qh:66
float wait
Definition: subs.qh:39
float delay
Definition: subs.qh:38
const int TSPEED_TIME
Definition: subs.qh:70
string noise1
Definition: progsdefs.qc:209
float platmovetype_start
Definition: subs.qh:44
float max_health
float takedamage
Definition: progsdefs.qc:147
int lodmodelindex2
float itemkeys
Definition: subs.qh:61
vector(float skel, float bonenum) _skel_get_boneabs_hidden
string target2
Definition: subs.qh:53
float t_width
Definition: subs.qh:33
vector finalangle
Definition: subs.qh:30
const int TSPEED_END
Definition: subs.qh:73
void SUB_CalcAngleMoveDone(entity this)
Definition: subs.qc:320
float lip
Definition: subs.qh:40
int lodmodelindex1
void SUB_CalcAngleMoveEnt(entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func)
Definition: subs.qc:371
void SUB_SetFade_Think(entity this)
Definition: subs.qc:57
void SUB_CalcMoveDone(entity this)
Definition: subs.qc:94
vector pos1
Definition: subs.qh:50
void SUB_Friction(entity this)
Definition: subs.qc:24
vector mangle
Definition: subs.qh:51
vector dest1
Definition: subs.qh:66
float sounds
Definition: subs.qh:42
vector finaldest
Definition: subs.qh:30
float t_length
Definition: subs.qh:33
vector pos2
Definition: subs.qh:50
void SUB_NullThink(entity this)
Definition: subs.qc:3
float DAMAGE_NO
Definition: progsdefs.qc:282
void SUB_VanishOrRemove(entity ent)
Definition: subs.qc:38
float fade_rate
Definition: subs.qh:27
float DAMAGE_YES
Definition: progsdefs.qc:283
string target4
Definition: subs.qh:55