]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/dpdefs/doc.md
Whitespace police
[xonotic/xonotic-data.pk3dir.git] / qcsrc / dpdefs / doc.md
1 # CSQC
2
3 ```
4
5 // input:
6 //   self
7 .void() predraw;
8
9 // input:
10 //   time
11 //   self
12 .void() think;
13
14 // 0 = keydown, key, character (EXT_CSQC)
15 // 1 = keyup, key, character (EXT_CSQC)
16 // 2 = mousemove relative, x, y (EXT_CSQC)
17 // 3 = mousemove absolute, x, y (DP_CSQC)
18 bool CSQC_InputEvent(int eventtype, int x, int y);
19
20 void CSQC_UpdateView(int width, int height);
21 bool CSQC_ConsoleCommand(string cmd);
22 bool CSQC_Parse_TempEntity();
23 bool CSQC_Parse_StuffCmd(string msg);
24 bool CSQC_Parse_Print(string msg);
25 bool CSQC_Parse_CenterPrint(string msg);
26 bool CSQC_Event_Sound(int ent, int channel, string sample, float volume, float attenuation, vector pos, float speed, int flags);
27
28 entity CSQC_Ent_Spawn(int entnum);
29 void CSQC_Ent_Update(bool isnew);
30 void CSQC_Ent_Remove();
31
32 void CSQC_Init();
33 void CSQC_Shutdown();
34
35 // input:
36 //   time
37 //   self
38 //   v_forward: forward
39 //   v_right: right
40 //   v_up: up
41 // output:
42 //   origin
43 //   v_forward: forward
44 //   v_right: right
45 //   v_up: up
46 //   trace_endpos: visorigin
47 .vector camera_transform(vector pos, vector ang);
48
49 // control start position of sound()
50 // calculated as ofs = time - sound_starttime
51 float sound_starttime;
52
53 ```
54
55 # SVQC
56
57 ```
58
59 .entity clientcamera;
60
61 // input:
62 //   time
63 //   self
64 void ClientDisconnect();
65
66 // input:
67 //   time
68 void SV_Shutdown();
69
70 // input:
71 //   time
72 void SV_PausedTic(float elapsed);
73
74 // input:
75 //   time
76 //   self
77 void SV_ChangeTeam(int color);
78
79 // input:
80 //   time
81 //   self
82 void ClientKill();
83
84 // input:
85 //   time
86 //   self
87 void RestoreGame();
88
89 // input:
90 //   time
91 //   self
92 //   parm1..n
93 void ClientConnect();
94
95 // input:
96 //   time
97 //   self
98 //   parm1..n
99 void PutClientInServer();
100
101 // return false to remove
102 .bool SendEntity(entity to, int sf);
103
104 // input:
105 //   time
106 //   self
107 void SV_OnEntityPreSpawnFunction();
108
109 // input:
110 //   time
111 //   self
112 void SV_OnEntityNoSpawnFunction();
113
114 // input:
115 //   time
116 //   self
117 void SV_OnEntityPostSpawnFunction();
118
119 // input:
120 //   time
121 // output:
122 //   parm1..n
123 void SetNewParms();
124
125 // input:
126 //
127 .bool customizeentityforclient();
128
129 // input:
130 //   time
131 //   self
132 // output:
133 //   parm1..n
134 void SetChangeParms();
135
136 // input:
137 //   time
138 //   self
139 //   other
140 //   trace_allsolid
141 //   trace_startsolid
142 //   trace_fraction
143 //   trace_inwater
144 //   trace_inopen
145 //   trace_endpos: self.origin
146 //   trace_plane_normal
147 //   trace_plane_dist
148 //   trace_ent: other
149 //   trace_dpstartcontents
150 //   trace_dphitcontents
151 //   trace_dphitq3surfaceflags
152 //   trace_dphittexturename
153 .void touch();
154
155 // when .watertype changes:
156 .void contentstransition(int prev, int current);
157
158 // input:
159 //   time
160 //   self
161 //   other
162 .void blocked();
163
164 // input:
165 //   time
166 //   self
167 .void movetypesteplandevent(vector vel);
168
169 // input:
170 //   time
171 //   self
172 void PlayerPreThink();
173
174 // input:
175 //   time
176 //   self
177 void PlayerPostThink();
178
179 // input:
180 //   time
181 //   frametime
182 void StartFrame();
183
184 // input:
185 //   time
186 void EndFrame();
187
188 // input:
189 //   time
190 //   self
191 void SV_PlayerPhysics();
192
193 // input:
194 //   time
195 //   self
196 void SV_ParseClientCommand(string cmd);
197
198 ```
199
200 # MENUQC
201
202 ```
203
204 void m_keydown(int key, int ascii);
205
206 void m_keyup(int key, int ascii);
207
208 void m_draw(int width, int height);
209
210 void m_toggle(int mode);
211
212 int m_gethostcachecategory(int entry);
213
214 void m_shutdown();
215
216 void m_init();
217
218 ```
219
220 # All
221
222 ```
223
224 void URI_Get_Callback(int id, int status, string data);
225
226 void GameCommand(string cmd);
227
228 ```