Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
subs.qh
Go to the documentation of this file.
1#pragma once
2#include "defs.qh"
3
4.float friction;
5void SUB_Friction(entity this);
6
7void SUB_NullThink(entity this);
8
9/*
10==================
11SUB_VanishOrRemove
12
13Makes client invisible or removes non-client
14==================
15*/
17
18void SUB_SetFade_Think(entity this);
19
20/*
21==================
22SUB_SetFade
23
24Fade 'ent' out when time >= 'when'
25==================
26*/
27.float fade_rate;
28void 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;
34
35.vector destvec;
36.vector destvec2;
37
38.float delay;
39.float wait;
40.float lip;
41.float speed;
42.float sounds;
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;
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
70const int TSPEED_TIME = -1;
71const int TSPEED_LINEAR = 0;
72const int TSPEED_START = 1;
73const 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
79const int DAMAGE_NO = 0;
80const int DAMAGE_YES = 1;
81const 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
89spawnfunc(info_null);
90#endif
91
92/*
93=============
94SUB_CalcMove
95
96calculate this.velocity and this.nextthink to reach dest from
97this.origin traveling at speed
98===============
99*/
100void SUB_CalcMoveDone(entity this);
101
102void SUB_CalcMovePause(entity this);
103
106
108
110
111void SUB_CalcMove_Bezier (entity this, vector tcontrol, vector tdest, float tspeedtype, float tspeed, void(entity this) func);
112
113void SUB_CalcMove (entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func);
114
115void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void(entity this) func);
116
117#ifdef SVQC
119
120void SetBrushEntityModel(entity this, bool with_lod);
121
125.string lodmodel1;
126.string lodmodel2;
132
133bool LOD_customize(entity this, entity client);
134
135void LOD_uncustomize(entity this);
136
137void LODmodel_attach(entity this);
138#endif
139
140/*
141=============
142SUB_CalcAngleMove
143
144calculate this.avelocity and this.nextthink to reach destangle from
145this.angles rotating
146
147The calling function should make sure this.think is valid
148===============
149*/
150void SUB_CalcAngleMoveDone (entity this);
151
152// FIXME: I fixed this function only for rotation around the main axes
153void SUB_CalcAngleMove (entity this, vector destangle, float tspeedtype, float tspeed, void(entity this) func);
154
155void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func);
156
157/*
158================
159InitTrigger
160================
161*/
162
163#ifdef SVQC
164void SetMovedir(entity this);
165
166void InitTrigger(entity this);
167
168void InitSolidBSPTrigger(entity this);
169
171#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float max_health
float delay
Definition items.qc:17
float wait
Definition items.qc:17
int lodmodelindex2
float loddistance2
int lodmodelindex1
float loddistance1
int lodmodelindex0
int state
float speed
Definition dynlight.qc:9
vector dest
Definition jumppads.qh:54
fade_rate
Definition projectile.qh:14
vector
Definition self.qh:92
vector org
Definition self.qh:92
#define spawnfunc(id)
Definition spawnfunc.qh:96
float friction
Definition subs.qc:23
float platmovetype_turn
Definition subs.qc:113
void SUB_CalcMoveDone(entity this)
Definition subs.qc:94
vector destvec
Definition subs.qh:35
void SetMovedir(entity this)
Definition subs.qc:540
float trigger_reverse
Definition subs.qh:58
string noise
Definition subs.qh:83
string lodmodel2
Definition subs.qh:126
void ApplyMinMaxScaleAngles(entity e)
Definition subs.qc:393
const int DAMAGE_YES
Definition subs.qh:80
vector finalangle
Definition subs.qh:30
string noise1
Definition subs.qh:83
bool InitMovingBrushTrigger(entity this)
Definition subs.qc:577
const int TSPEED_END
Definition subs.qh:73
const int TSPEED_START
Definition subs.qh:72
const int DAMAGE_NO
Definition subs.qh:79
void SUB_CalcMove_controller_think(entity this)
Definition subs.qc:114
entity move_controller
Definition subs.qh:68
string lodtarget1
Definition subs.qh:123
void SUB_CalcMove_controller_setlinear(entity controller, vector org, vector dest)
Definition subs.qc:190
float platmovetype_start
Definition subs.qh:44
void SUB_CalcAngleMoveEnt(entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func)
Definition subs.qc:387
void SetBrushEntityModel(entity this, bool with_lod)
Definition subs.qc:420
void SUB_Friction(entity this)
Definition subs.qc:24
vector pos2
Definition subs.qh:50
void SUB_CalcMove_controller_setbezier(entity controller, vector org, vector control, vector dest)
Definition subs.qc:174
void InitSolidBSPTrigger(entity this)
Definition subs.qc:565
vector mangle
Definition subs.qh:51
string curvetarget
Definition subs.qh:56
float itemkeys
Definition subs.qh:61
float lip
Definition subs.qh:40
vector destvec2
Definition subs.qh:36
string lodtarget2
Definition subs.qh:124
float sounds
Definition subs.qh:42
string killtarget
Definition subs.qh:48
bool LOD_customize(entity this, entity client)
Definition subs.qc:443
void SUB_NullThink(entity this)
Definition subs.qc:3
void SUB_SetFade_Think(entity this)
Definition subs.qc:57
float key_door_messagetime
Definition subs.qh:64
float platmovetype_end
Definition subs.qh:44
vector pos1
Definition subs.qh:50
vector dest1
Definition subs.qh:66
void SUB_CalcAngleMove(entity this, vector destangle, float tspeedtype, float tspeed, void(entity this) func)
Definition subs.qc:347
float t_width
Definition subs.qh:33
void LOD_uncustomize(entity this)
Definition subs.qc:469
string lodmodel1
Definition subs.qh:125
void SUB_SetFade(entity ent, float when, float fading_time)
Definition subs.qc:77
string target4
Definition subs.qh:55
void SUB_CalcMoveEnt(entity ent, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
Definition subs.qc:321
string noise3
Definition subs.qh:83
int autocvar_loddebug
Definition subs.qh:122
const int DAMAGE_AIM
Definition subs.qh:81
vector dest2
Definition subs.qh:66
float t_length
Definition subs.qh:33
void SUB_VanishOrRemove(entity ent)
Definition subs.qc:38
void SUB_CalcMovePause(entity this)
Definition subs.qc:105
const int TSPEED_TIME
Definition subs.qh:70
string noise2
Definition subs.qh:83
string target3
Definition subs.qh:54
void LODmodel_attach(entity this)
Definition subs.qc:474
vector finaldest
Definition subs.qh:30
const int TSPEED_LINEAR
Definition subs.qh:71
void SUB_CalcMove(entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
Definition subs.qc:267
void InitTrigger(entity this)
Definition subs.qc:553
float target_random
Definition subs.qh:57
void SUB_CalcMove_Bezier(entity this, vector tcontrol, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
Definition subs.qc:204
void SUB_CalcAngleMoveDone(entity this)
Definition subs.qc:336
string platmovetype
Definition subs.qh:43
float takedamage
Definition subs.qh:78
string target2