]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/dpdefs/doc.md
Transmute player entities
[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 // Called when a client connects to the server
90 // input:
91 //   time
92 //   self
93 //   parm1..n
94 void ClientConnect();
95
96 // Called when a client spawns in the server
97 // input:
98 //   time
99 //   self
100 //   parm1..n
101 void PutClientInServer();
102
103 // return false to remove
104 .bool SendEntity(entity to, int sf);
105
106 // input:
107 //   time
108 //   self
109 void SV_OnEntityPreSpawnFunction();
110
111 // input:
112 //   time
113 //   self
114 void SV_OnEntityNoSpawnFunction();
115
116 // input:
117 //   time
118 //   self
119 void SV_OnEntityPostSpawnFunction();
120
121 // input:
122 //   time
123 // output:
124 //   parm1..n
125 void SetNewParms();
126
127 // input:
128 //
129 .bool customizeentityforclient();
130
131 // input:
132 //   time
133 //   self
134 // output:
135 //   parm1..n
136 void SetChangeParms();
137
138 // input:
139 //   time
140 //   self
141 //   other
142 //   trace_allsolid
143 //   trace_startsolid
144 //   trace_fraction
145 //   trace_inwater
146 //   trace_inopen
147 //   trace_endpos: self.origin
148 //   trace_plane_normal
149 //   trace_plane_dist
150 //   trace_ent: other
151 //   trace_dpstartcontents
152 //   trace_dphitcontents
153 //   trace_dphitq3surfaceflags
154 //   trace_dphittexturename
155 .void touch();
156
157 // when .watertype changes:
158 .void contentstransition(int prev, int current);
159
160 // input:
161 //   time
162 //   self
163 //   other
164 .void blocked();
165
166 // input:
167 //   time
168 //   self
169 .void movetypesteplandevent(vector vel);
170
171 // input:
172 //   time
173 //   self
174 void PlayerPreThink();
175
176 // input:
177 //   time
178 //   self
179 void PlayerPostThink();
180
181 // input:
182 //   time
183 //   frametime
184 void StartFrame();
185
186 // input:
187 //   time
188 void EndFrame();
189
190 // input:
191 //   time
192 //   self
193 void SV_PlayerPhysics();
194
195 // input:
196 //   time
197 //   self
198 void SV_ParseClientCommand(string cmd);
199
200 ```
201
202 # MENUQC
203
204 ```
205
206 void m_keydown(int key, int ascii);
207
208 void m_keyup(int key, int ascii);
209
210 void m_draw(int width, int height);
211
212 void m_toggle(int mode);
213
214 int m_gethostcachecategory(int entry);
215
216 void m_shutdown();
217
218 void m_init();
219
220 ```
221
222 # All
223
224 ```
225
226 void URI_Get_Callback(int id, int status, string data);
227
228 void GameCommand(string cmd);
229
230 ```