]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/dpdefs/doc.md
Merge branch 'master' into terencehill/menu_hudskin_selector
[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 ```
50
51 # SVQC
52
53 ```
54
55 .entity clientcamera;
56
57 // input:
58 //   time
59 //   self
60 void ClientDisconnect();
61
62 // input:
63 //   time
64 void SV_Shutdown();
65
66 // input:
67 //   time
68 void SV_PausedTic(float elapsed);
69
70 // input:
71 //   time
72 //   self
73 void SV_ChangeTeam(int color);
74
75 // input:
76 //   time
77 //   self
78 void ClientKill();
79
80 // input:
81 //   time
82 //   self
83 void RestoreGame();
84
85 // input:
86 //   time
87 //   self
88 //   parm1..n
89 void ClientConnect();
90
91 // input:
92 //   time
93 //   self
94 //   parm1..n
95 void PutClientInServer();
96
97 // return false to remove
98 .bool SendEntity(entity to, int sf);
99
100 // input:
101 //   time
102 //   self
103 void SV_OnEntityPreSpawnFunction();
104
105 // input:
106 //   time
107 //   self
108 void SV_OnEntityNoSpawnFunction();
109
110 // input:
111 //   time
112 //   self
113 void SV_OnEntityPostSpawnFunction();
114
115 // input:
116 //   time
117 // output:
118 //   parm1..n
119 void SetNewParms();
120
121 // input:
122 //   
123 .bool customizeentityforclient();
124
125 // input:
126 //   time
127 //   self
128 // output:
129 //   parm1..n
130 void SetChangeParms();
131
132 // input:
133 //   time
134 //   self
135 //   other
136 //   trace_allsolid
137 //   trace_startsolid
138 //   trace_fraction
139 //   trace_inwater
140 //   trace_inopen
141 //   trace_endpos: self.origin
142 //   trace_plane_normal
143 //   trace_plane_dist
144 //   trace_ent: other
145 //   trace_dpstartcontents
146 //   trace_dphitcontents
147 //   trace_dphitq3surfaceflags
148 //   trace_dphittexturename
149 .void touch();
150
151 // when .watertype changes:
152 .void contentstransition(int prev, int current);
153
154 // input:
155 //   time
156 //   self
157 //   other
158 .void blocked();
159
160 // input:
161 //   time
162 //   self
163 .void movetypesteplandevent(vector vel);
164
165 // input:
166 //   time
167 //   self
168 void PlayerPreThink();
169
170 // input:
171 //   time
172 //   self
173 void PlayerPostThink();
174
175 // input:
176 //   time
177 //   frametime
178 void StartFrame();
179
180 // input:
181 //   time
182 void EndFrame();
183
184 // input:
185 //   time
186 //   self
187 void SV_PlayerPhysics();
188
189 // input:
190 //   time
191 //   self
192 void SV_ParseClientCommand(string cmd);
193
194 ```
195
196 # MENUQC
197
198 ```
199
200 void m_keydown(int key, int ascii);
201
202 void m_keyup(int key, int ascii);
203
204 void m_draw(int width, int height);
205
206 void m_toggle(int mode);
207
208 int m_gethostcachecategory(int entry);
209
210 void m_shutdown();
211
212 void m_init();
213
214 ```
215
216 # All
217
218 ```
219
220 void URI_Get_Callback(int id, int status, string data);
221
222 void GameCommand(string cmd);
223
224 ```