vkQuake2 doxygen  1.0 dev
client.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 // client.h -- primary header for client
21 
22 //define PARANOID // speed sapping error checking
23 
24 #include <math.h>
25 #include <string.h>
26 #include <stdarg.h>
27 #include <stdio.h>
28 #include <stdlib.h>
29 
30 #include "ref.h"
31 
32 #include "vid.h"
33 #include "screen.h"
34 #include "sound.h"
35 #include "input.h"
36 #include "keys.h"
37 #include "console.h"
38 #include "cdaudio.h"
39 #include "snd_miniaudio.h"
40 
41 //=============================================================================
42 
43 typedef struct
44 {
45  qboolean valid; // cleared if delta parsing was invalid
47  int servertime; // server time the message is valid for (in msec)
49  byte areabits[MAX_MAP_AREAS/8]; // portalarea visibility bits
52  int parse_entities; // non-masked index into cl_parse_entities array
53 } frame_t;
54 
55 typedef struct
56 {
57  entity_state_t baseline; // delta from this if not from a previous frame
59  entity_state_t prev; // will always be valid, but might just be a copy of current
60 
61  int serverframe; // if not current, this ent isn't in the frame
62 
63  int trailcount; // for diminishing grenade trails
64  vec3_t lerp_origin; // for trails (variable hz)
65 
67 } centity_t;
68 
69 #define MAX_CLIENTWEAPONMODELS 20 // PGM -- upped from 16 to fit the chainfist vwep
70 
71 typedef struct
72 {
73  char name[MAX_QPATH];
74  char cinfo[MAX_QPATH];
75  struct image_s *skin;
76  struct image_s *icon;
77  char iconname[MAX_QPATH];
78  struct model_s *model;
79  struct model_s *weaponmodel[MAX_CLIENTWEAPONMODELS];
80 } clientinfo_t;
81 
83 extern int num_cl_weaponmodels;
84 
85 #define CMD_BACKUP 64 // allow a lot of command backups for very fast systems
86 
87 //
88 // the client_state_t structure is wiped completely at every
89 // server map change
90 //
91 typedef struct
92 {
94 
97 
98  qboolean refresh_prepped; // false if on new level or new ref dll
99  qboolean sound_prepped; // ambient sounds can start
100  qboolean force_refdef; // vid has changed, so we can't use a paused refdef
101 
102  int parse_entities; // index (not anded off) into cl_parse_entities[]
103 
105  usercmd_t cmds[CMD_BACKUP]; // each mesage will send several old cmds
106  int cmd_time[CMD_BACKUP]; // time sent, for calculating pings
107  short predicted_origins[CMD_BACKUP][3]; // for debug comparing against server
108 
109  float predicted_step; // for stair up smoothing
111 
112  vec3_t predicted_origin; // generated by CL_PredictMovement
115 
116  frame_t frame; // received from server
117  int surpressCount; // number of messages rate supressed
119 
120  // the client maintains its own idea of view angles, which are
121  // sent to the server each frame. It is cleared to 0 upon entering each level.
122  // the server sends a delta each frame which is added to the locally
123  // tracked view angles to account for standing on rotating objects,
124  // and teleport direction changes
126 
127  int time; // this is the time value that the client
128  // is rendering at. always <= cls.realtime
129  float lerpfrac; // between oldframe and frame
130 
132 
133  vec3_t v_forward, v_right, v_up; // set when refdef.angles is set
134 
135  //
136  // transient data from server
137  //
138  char layout[1024]; // general 2D overlay
139  int inventory[MAX_ITEMS];
140 
141  //
142  // non-gameserver infornamtion
143  // FIXME: move this cinematic stuff into the cin_t structure
145  int cinematictime; // cls.realtime for first cinematic frame
147  char cinematicpalette[768];
149 
150  //
151  // server state information
152  //
153  qboolean attractloop; // running the attract loop, any key will menu
154  int servercount; // server identification for prespawns
155  char gamedir[MAX_QPATH];
157 
158  char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH];
159 
160  //
161  // locally derived information from server state
162  //
163  struct model_s *model_draw[MAX_MODELS];
164  struct cmodel_s *model_clip[MAX_MODELS];
165 
166  struct sfx_s *sound_precache[MAX_SOUNDS];
167  struct image_s *image_precache[MAX_IMAGES];
168 
172 
173 extern client_state_t cl;
174 
175 /*
176 ==================================================================
177 
178 the client_static_t structure is persistant through an arbitrary number
179 of server connections
180 
181 ==================================================================
182 */
183 
184 typedef enum {
186  ca_disconnected, // not talking to a server
187  ca_connecting, // sending request packets to the server
188  ca_connected, // netchan_t established, waiting for svc_serverdata
189  ca_active // game views should be displayed
190 } connstate_t;
191 
192 typedef enum {
198 } dltype_t; // download type
199 
201 
202 typedef struct
203 {
206 
208  int realtime; // always increasing, no clamping, etc
209  float frametime; // seconds since last frame
210 
211 // screen rendering information
212  float disable_screen; // showing loading plaque between levels
213  // or changing rendering dlls
214  // if time gets > 30 seconds ahead, break it
215  int disable_servercount; // when we receive a frame and cl.servercount
216  // > cls.disable_servercount, clear disable_screen
217 
218 // connection information
219  char servername[MAX_OSPATH]; // name of server from original connect
220  float connect_time; // for connection retransmits
221 
222  int quakePort; // a 16 bit value that allows quake servers
223  // to work around address translating routers
225  int serverProtocol; // in case we are doing some kind of version hack
226 
227  int challenge; // from the server to use for connecting
228 
229  FILE *download; // file transfer from server
230  char downloadtempname[MAX_OSPATH];
231  char downloadname[MAX_OSPATH];
235 
236 // demo recording info must be here, so it isn't cleared on level change
238  qboolean demowaiting; // don't record until a non-delta message is received
239  FILE *demofile;
241 
242 extern client_static_t cls;
243 
244 //=============================================================================
245 
246 //
247 // cvars
248 //
250 extern cvar_t *cl_stereo;
251 
252 extern cvar_t *cl_gun;
253 extern cvar_t *cl_add_blend;
254 extern cvar_t *cl_add_lights;
255 extern cvar_t *cl_add_particles;
256 extern cvar_t *cl_add_entities;
257 extern cvar_t *cl_predict;
258 extern cvar_t *cl_footsteps;
259 extern cvar_t *cl_noskins;
260 extern cvar_t *cl_autoskins;
261 
262 extern cvar_t *cl_upspeed;
263 extern cvar_t *cl_forwardspeed;
264 extern cvar_t *cl_sidespeed;
265 
266 extern cvar_t *cl_yawspeed;
267 extern cvar_t *cl_pitchspeed;
268 
269 extern cvar_t *cl_run;
270 
271 extern cvar_t *cl_anglespeedkey;
272 
273 extern cvar_t *cl_shownet;
274 extern cvar_t *cl_showmiss;
275 extern cvar_t *cl_showclamp;
276 
277 extern cvar_t *lookspring;
278 extern cvar_t *lookstrafe;
279 extern cvar_t *sensitivity;
280 
281 extern cvar_t *m_pitch;
282 extern cvar_t *m_yaw;
283 extern cvar_t *m_forward;
284 extern cvar_t *m_side;
285 
286 extern cvar_t *freelook;
287 
288 extern cvar_t *cl_lightlevel; // FIXME HACK
289 
290 extern cvar_t *cl_paused;
291 extern cvar_t *cl_timedemo;
292 
293 extern cvar_t *cl_vwep;
294 
295 typedef struct
296 {
297  int key; // so entities can reuse same entry
300  float radius;
301  float die; // stop lighting after this time
302  float decay; // drop this each second
303  float minlight; // don't add when contributing less
304 } cdlight_t;
305 
308 
309 // the cl_parse_entities must be large enough to hold UPDATE_BACKUP frames of
310 // entities, so that when a delta compressed message arives from the server
311 // it can be un-deltad from the original
312 #define MAX_PARSE_ENTITIES 1024
314 
315 //=============================================================================
316 
317 extern netadr_t net_from;
318 extern sizebuf_t net_message;
319 
320 void DrawString (int x, int y, char *s);
321 void DrawAltString (int x, int y, char *s); // toggle high bit
322 qboolean CL_CheckOrDownloadFile (char *filename);
323 
324 void CL_AddNetgraph (void);
325 
326 //ROGUE
327 typedef struct cl_sustain
328 {
329  int id;
330  int type;
331  int endtime;
336  int color;
337  int count;
339  void (*think)(struct cl_sustain *self);
340 } cl_sustain_t;
341 
342 #define MAX_SUSTAINS 32
344 
346 void CL_ParticleEffect (vec3_t org, vec3_t dir, int color, int count);
347 void CL_ParticleEffect2 (vec3_t org, vec3_t dir, int color, int count);
348 
349 // RAFAEL
350 void CL_ParticleEffect3 (vec3_t org, vec3_t dir, int color, int count);
351 
352 
353 //=================================================
354 
355 // ========
356 // PGM
357 typedef struct particle_s
358 {
359  struct particle_s *next;
360 
361  float time;
362 
366  float color;
367  float colorvel;
368  float alpha;
369  float alphavel;
370 } cparticle_t;
371 
372 
373 #define PARTICLE_GRAVITY 40
374 #define BLASTER_PARTICLE_COLOR 0xe0
375 // PMM
376 #define INSTANT_PARTICLE -10000.0
377 // PGM
378 // ========
379 
380 void CL_ClearEffects (void);
381 void CL_ClearTEnts (void);
382 void CL_BlasterTrail (vec3_t start, vec3_t end);
383 void CL_QuadTrail (vec3_t start, vec3_t end);
384 void CL_RailTrail (vec3_t start, vec3_t end);
385 void CL_BubbleTrail (vec3_t start, vec3_t end);
386 void CL_FlagTrail (vec3_t start, vec3_t end, float color);
387 
388 // RAFAEL
389 void CL_IonripperTrail (vec3_t start, vec3_t end);
390 
391 // ========
392 // PGM
393 void CL_BlasterParticles2 (vec3_t org, vec3_t dir, unsigned int color);
394 void CL_BlasterTrail2 (vec3_t start, vec3_t end);
395 void CL_DebugTrail (vec3_t start, vec3_t end);
396 void CL_SmokeTrail (vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing);
397 void CL_Flashlight (int ent, vec3_t pos);
398 void CL_ForceWall (vec3_t start, vec3_t end, int color);
399 void CL_FlameEffects (centity_t *ent, vec3_t origin);
400 void CL_GenericParticleEffect (vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel);
401 void CL_BubbleTrail2 (vec3_t start, vec3_t end, int dist);
402 void CL_Heatbeam (vec3_t start, vec3_t end);
403 void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude);
404 void CL_TrackerTrail (vec3_t start, vec3_t end, int particleColor);
405 void CL_Tracker_Explode(vec3_t origin);
406 void CL_TagTrail (vec3_t start, vec3_t end, float color);
407 void CL_ColorFlash (vec3_t pos, int ent, int intensity, float r, float g, float b);
408 void CL_Tracker_Shell(vec3_t origin);
409 void CL_MonsterPlasma_Shell(vec3_t origin);
410 void CL_ColorExplosionParticles (vec3_t org, int color, int run);
411 void CL_ParticleSmokeEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude);
412 void CL_Widowbeamout (cl_sustain_t *self);
413 void CL_Nukeblast (cl_sustain_t *self);
414 void CL_WidowSplash (vec3_t org);
415 // PGM
416 // ========
417 
418 int CL_ParseEntityBits (unsigned *bits);
419 void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int number, int bits);
420 void CL_ParseFrame (void);
421 
422 void CL_ParseTEnt (void);
423 void CL_ParseConfigString (void);
424 void CL_ParseMuzzleFlash (void);
425 void CL_ParseMuzzleFlash2 (void);
426 void SmokeAndFlash(vec3_t origin);
427 
428 void CL_SetLightstyle (int i);
429 
430 void CL_RunParticles (void);
431 void CL_RunDLights (void);
432 void CL_RunLightStyles (void);
433 
434 void CL_AddEntities (void);
435 void CL_AddDLights (void);
436 void CL_AddTEnts (void);
437 void CL_AddLightStyles (void);
438 
439 //=================================================
440 
441 void CL_PrepRefresh (void);
442 void CL_RegisterSounds (void);
443 
444 void CL_Quit_f (void);
445 
446 void IN_Accumulate (void);
447 
448 void CL_ParseLayout (void);
449 
450 
451 //
452 // cl_main
453 //
454 extern refexport_t re; // interface to refresh .dll
455 
456 void CL_Init (void);
457 
458 void CL_FixUpGender(void);
459 void CL_Disconnect (void);
460 void CL_Disconnect_f (void);
461 void CL_GetChallengePacket (void);
462 void CL_PingServers_f (void);
463 void CL_Snd_Restart_f (void);
464 void CL_RequestNextDownload (void);
465 
466 //
467 // cl_input
468 //
469 typedef struct
470 {
471  int down[2]; // key nums holding it down
472  unsigned downtime; // msec timestamp
473  unsigned msec; // msec down this frame
474  int state;
475 } kbutton_t;
476 
478 extern kbutton_t in_strafe;
479 extern kbutton_t in_speed;
480 
481 void CL_InitInput (void);
482 void CL_SendCmd (void);
483 void CL_SendMove (usercmd_t *cmd);
484 
485 void CL_ClearState (void);
486 
487 void CL_ReadPackets (void);
488 
489 int CL_ReadFromServer (void);
490 void CL_WriteToServer (usercmd_t *cmd);
491 void CL_BaseMove (usercmd_t *cmd);
492 
493 void IN_CenterView (void);
494 
495 float CL_KeyState (kbutton_t *key);
496 char *Key_KeynumToString (int keynum);
497 
498 //
499 // cl_demo.c
500 //
501 void CL_WriteDemoMessage (void);
502 void CL_Stop_f (void);
503 void CL_Record_f (void);
504 
505 //
506 // cl_parse.c
507 //
508 extern char *svc_strings[256];
509 
510 void CL_ParseServerMessage (void);
511 void CL_LoadClientinfo (clientinfo_t *ci, char *s);
512 void SHOWNET(char *s);
513 void CL_ParseClientinfo (int player);
514 void CL_Download_f (void);
515 
516 //
517 // cl_view.c
518 //
519 extern int gun_frame;
520 extern struct model_s *gun_model;
521 
522 void V_Init (void);
523 void V_RenderView( float stereo_separation );
524 void V_AddEntity (entity_t *ent);
525 void V_AddParticle (vec3_t org, int color, float alpha);
526 void V_AddLight (vec3_t org, float intensity, float r, float g, float b);
527 void V_AddLightStyle (int style, float r, float g, float b);
528 
529 //
530 // cl_tent.c
531 //
532 void CL_RegisterTEntSounds (void);
533 void CL_RegisterTEntModels (void);
534 void CL_SmokeAndFlash(vec3_t origin);
535 
536 
537 //
538 // cl_pred.c
539 //
540 void CL_InitPrediction (void);
541 void CL_PredictMove (void);
542 void CL_CheckPredictionError (void);
543 
544 //
545 // cl_fx.c
546 //
547 cdlight_t *CL_AllocDlight (int key);
549 void CL_RocketTrail (vec3_t start, vec3_t end, centity_t *old);
550 void CL_DiminishingTrail (vec3_t start, vec3_t end, centity_t *old, int flags);
551 void CL_FlyEffect (centity_t *ent, vec3_t origin);
552 void CL_BfgParticles (entity_t *ent);
553 void CL_AddParticles (void);
554 void CL_EntityEvent (entity_state_t *ent);
555 // RAFAEL
556 void CL_TrapParticles (entity_t *ent);
557 
558 //
559 // menus
560 //
561 void M_Init (void);
562 void M_Keydown (int key);
563 void M_Draw (void);
564 void M_Menu_Main_f (void);
565 void M_ForceMenuOff (void);
566 void M_AddToServerList (netadr_t adr, char *info);
567 
568 //
569 // cl_inv.c
570 //
571 void CL_ParseInventory (void);
572 void CL_KeyInventory (int key);
573 void CL_DrawInventory (void);
574 
575 //
576 // cl_pred.c
577 //
578 void CL_PredictMovement (void);
579 
580 #if id386
581 void x86_TimerStart( void );
582 void x86_TimerStop( void );
583 void x86_TimerInit( unsigned long smallest, unsigned longest );
584 unsigned long *x86_TimerGetHistogram( void );
585 #endif
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:86
CL_BubbleTrail
void CL_BubbleTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1768
dl_single
@ dl_single
Definition: client.h:197
CL_ParticleSmokeEffect
void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:1192
CL_AddParticles
void CL_AddParticles(void)
Definition: cl_fx.c:2190
particle_s::vel
vec3_t vel
Definition: client.h:364
CL_GenericParticleEffect
void CL_GenericParticleEffect(vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel)
Definition: cl_newfx.c:344
CL_ParseEntityBits
int CL_ParseEntityBits(unsigned *bits)
just for protocol profiling
Definition: cl_ents.c:202
client_state_t::predicted_origin
vec3_t predicted_origin
Definition: client.h:112
client_static_t::challenge
int challenge
Definition: client.h:227
sizebuf_s
Definition: qcommon.h:92
cl_upspeed
cvar_t * cl_upspeed
Definition: cl_input.c:223
cdlight_t::decay
float decay
Definition: client.h:302
m_yaw
cvar_t * m_yaw
Definition: cl_main.c:68
client_state_t::servercount
int servercount
Definition: client.h:154
ref.h
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:80
MAX_MODELS
#define MAX_MODELS
Definition: q_shared.h:89
vid.h
MAX_DLIGHTS
#define MAX_DLIGHTS
Definition: ref.h:25
CL_ReadFromServer
int CL_ReadFromServer(void)
refdef_t
Definition: ref.h:102
centity_t::fly_stoptime
int fly_stoptime
Definition: client.h:66
SmokeAndFlash
void SmokeAndFlash(vec3_t origin)
CL_ColorFlash
void CL_ColorFlash(vec3_t pos, int ent, int intensity, float r, float g, float b)
Definition: cl_newfx.c:95
dl_none
@ dl_none
Definition: client.h:193
CL_KeyInventory
void CL_KeyInventory(int key)
client_state_t::attractloop
qboolean attractloop
Definition: client.h:153
CL_AllocDlight
cdlight_t * CL_AllocDlight(int key)
Definition: cl_fx.c:149
cdlight_t::radius
float radius
Definition: client.h:300
cl_parse_entities
entity_state_t cl_parse_entities[MAX_PARSE_ENTITIES]
Definition: cl_main.c:95
kbutton_t::state
int state
Definition: client.h:474
dl_sound
@ dl_sound
Definition: client.h:195
CL_RailTrail
void CL_RailTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1613
client_static_t::disable_screen
float disable_screen
Definition: client.h:212
cl_sustain::magnitude
int magnitude
Definition: client.h:338
CL_DrawInventory
void CL_DrawInventory(void)
Definition: cl_inv.c:68
cl_sustain::type
int type
Definition: client.h:330
cl_run
cvar_t * cl_run
Definition: cl_input.c:230
cl_anglespeedkey
cvar_t * cl_anglespeedkey
Definition: cl_input.c:232
cl_dlights
cdlight_t cl_dlights[MAX_DLIGHTS]
Definition: cl_fx.c:131
particle_s::time
float time
Definition: client.h:361
ca_disconnected
@ ca_disconnected
Definition: client.h:186
client_state_t::v_up
vec3_t v_up
Definition: client.h:133
cl_sustain
Definition: client.h:327
particle_s::accel
vec3_t accel
Definition: client.h:365
keys.h
CL_Widowbeamout
void CL_Widowbeamout(cl_sustain_t *self)
Definition: cl_newfx.c:961
cl_sustain::count
int count
Definition: client.h:337
CL_ClearTEnts
void CL_ClearTEnts(void)
Definition: cl_tent.c:213
M_Menu_Main_f
void M_Menu_Main_f(void)
Definition: menu.c:494
entity_state_s
Definition: q_shared.h:1145
cdlight_t::die
float die
Definition: client.h:301
CL_RunParticles
void CL_RunParticles(void)
client_state_t::timeoutcount
int timeoutcount
Definition: client.h:93
frame_t::parse_entities
int parse_entities
Definition: client.h:52
ca_uninitialized
@ ca_uninitialized
Definition: client.h:185
cl_stereo_separation
cvar_t * cl_stereo_separation
Definition: cl_main.c:36
CL_FlyEffect
void CL_FlyEffect(centity_t *ent, vec3_t origin)
Definition: cl_fx.c:1886
ca_connecting
@ ca_connecting
Definition: client.h:187
model_s::flags
int flags
Definition: r_model.h:180
CL_BfgParticles
void CL_BfgParticles(entity_t *ent)
Definition: cl_fx.c:1925
cparticle_t
struct particle_s cparticle_t
svc_strings
char * svc_strings[256]
Definition: cl_parse.c:24
CL_BaseMove
void CL_BaseMove(usercmd_t *cmd)
Definition: cl_input.c:277
client_state_t::prediction_error
vec3_t prediction_error
Definition: client.h:114
cl_sustain::id
int id
Definition: client.h:329
cl_sustain::endtime
int endtime
Definition: client.h:331
cdlight_t
Definition: client.h:295
client_state_t::predicted_angles
vec3_t predicted_angles
Definition: client.h:113
CL_ParseDelta
void CL_ParseDelta(entity_state_t *from, entity_state_t *to, int number, int bits)
Definition: cl_ents.c:247
UPDATE_BACKUP
#define UPDATE_BACKUP
Definition: qcommon.h:207
screen.h
in_strafe
kbutton_t in_strafe
Definition: cl_input.c:61
qboolean
qboolean
Definition: q_shared.h:63
x
GLint GLenum GLint x
Definition: qgl_win.c:116
client_state_t::viewangles
vec3_t viewangles
Definition: client.h:125
client_static_t::disable_servercount
int disable_servercount
Definition: client.h:215
CL_ParseTEnt
void CL_ParseTEnt(void)
Definition: cl_tent.c:694
CL_TagTrail
void CL_TagTrail(vec3_t start, vec3_t end, float color)
Definition: cl_newfx.c:1107
i
int i
Definition: q_shared.c:305
CL_TrapParticles
void CL_TrapParticles(entity_t *ent)
Definition: cl_fx.c:1998
CL_BlasterTrail
void CL_BlasterTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1284
CL_ParseServerMessage
void CL_ParseServerMessage(void)
Definition: cl_parse.c:661
sfx_s
Definition: snd_loc.h:39
cl_paused
cvar_t * cl_paused
Definition: cl_main.c:60
CL_WidowSplash
void CL_WidowSplash(vec3_t org)
Definition: cl_newfx.c:1033
client_static_t::demorecording
qboolean demorecording
Definition: client.h:237
frame_t::num_entities
int num_entities
Definition: client.h:51
ca_active
@ ca_active
Definition: client.h:189
netchan_t
Definition: qcommon.h:582
CL_PingServers_f
void CL_PingServers_f(void)
Definition: cl_main.c:802
model_s
Definition: r_model.h:171
CL_Snd_Restart_f
void CL_Snd_Restart_f(void)
Definition: cl_main.c:1098
particle_s::org
vec3_t org
Definition: client.h:363
CL_FixUpGender
void CL_FixUpGender(void)
Definition: cl_main.c:1053
client_state_t::cinematictime
int cinematictime
Definition: client.h:145
CL_Tracker_Explode
void CL_Tracker_Explode(vec3_t origin)
Definition: cl_newfx.c:1067
cdlight_t::key
int key
Definition: client.h:297
CL_CheckPredictionError
void CL_CheckPredictionError(void)
Definition: cl_pred.c:29
CL_ParseClientinfo
void CL_ParseClientinfo(int player)
Definition: cl_parse.c:501
CL_ParticleSteamEffect2
void CL_ParticleSteamEffect2(cl_sustain_t *self)
Definition: cl_newfx.c:792
console.h
MAX_MAP_AREAS
#define MAX_MAP_AREAS
Definition: qfiles.h:234
net_message
sizebuf_t net_message
Definition: net_chan.c:82
client_state_t::refdef
refdef_t refdef
Definition: client.h:131
centity_t::baseline
entity_state_t baseline
Definition: client.h:57
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, char *s)
Definition: cl_parse.c:380
CL_Flashlight
void CL_Flashlight(int ent, vec3_t pos)
Definition: cl_newfx.c:76
CL_TrackerTrail
void CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
Definition: cl_newfx.c:844
CL_Nukeblast
void CL_Nukeblast(cl_sustain_t *self)
Definition: cl_newfx.c:997
cvar_s
Definition: q_shared.h:324
CL_GetChallengePacket
void CL_GetChallengePacket(void)
CL_ParseInventory
void CL_ParseInventory(void)
Definition: cl_inv.c:31
client_state_t::force_refdef
qboolean force_refdef
Definition: client.h:100
key_menu
@ key_menu
Definition: client.h:200
intensity
cvar_t * intensity
Definition: gl_image.c:31
CL_BlasterParticles2
void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color)
Definition: cl_newfx.c:1238
DrawString
void DrawString(int x, int y, char *s)
Definition: console.c:36
cdaudio.h
client_static_t
Definition: client.h:202
particle_s::next
struct particle_s * next
Definition: client.h:359
centity_t::lerp_origin
vec3_t lerp_origin
Definition: client.h:64
client_state_t::cinematicframe
int cinematicframe
Definition: client.h:146
m_pitch
cvar_t * m_pitch
Definition: cl_main.c:67
cl_yawspeed
cvar_t * cl_yawspeed
Definition: cl_input.c:227
client_state_t::timedemo_start
int timedemo_start
Definition: client.h:96
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:93
gun_frame
int gun_frame
Definition: cl_view.c:28
CL_WriteDemoMessage
void CL_WriteDemoMessage(void)
Definition: cl_main.c:115
re
refexport_t re
Definition: vid_dll.c:32
CL_KeyState
float CL_KeyState(kbutton_t *key)
Definition: cl_input.c:186
CL_QuadTrail
void CL_QuadTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1335
particle_s::alphavel
float alphavel
Definition: client.h:369
particle_s
Definition: client.h:357
CL_BlasterTrail2
void CL_BlasterTrail2(vec3_t start, vec3_t end)
Definition: cl_newfx.c:1280
CL_Quit_f
void CL_Quit_f(void)
Definition: cl_main.c:386
V_AddLight
void V_AddLight(vec3_t org, float intensity, float r, float g, float b)
Definition: cl_view.c:111
CL_DebugTrail
void CL_DebugTrail(vec3_t start, vec3_t end)
Definition: cl_newfx.c:123
clientinfo_t::model
struct model_s * model
Definition: client.h:78
CL_AddEntities
void CL_AddEntities(void)
Definition: cl_ents.c:1477
in_speed
kbutton_t in_speed
Definition: cl_input.c:61
client_static_t::downloadnumber
int downloadnumber
Definition: client.h:232
r
GLdouble GLdouble r
Definition: qgl_win.c:336
V_AddEntity
void V_AddEntity(entity_t *ent)
Definition: cl_view.c:79
CL_ParseMuzzleFlash
void CL_ParseMuzzleFlash(void)
Definition: cl_fx.c:238
centity_t
Definition: client.h:55
client_static_t::demowaiting
qboolean demowaiting
Definition: client.h:238
CL_PrepRefresh
void CL_PrepRefresh(void)
Definition: cl_view.c:250
CL_AddTEnts
void CL_AddTEnts(void)
Definition: cl_tent.c:1738
cl_stereo
cvar_t * cl_stereo
Definition: cl_main.c:37
CL_CheckOrDownloadFile
qboolean CL_CheckOrDownloadFile(char *filename)
Definition: cl_parse.c:69
cl_noskins
cvar_t * cl_noskins
Definition: cl_main.c:42
cl_gun
cvar_t * cl_gun
Definition: cl_main.c:49
M_Init
void M_Init(void)
Definition: menu.c:3973
cl_add_entities
cvar_t * cl_add_entities
Definition: cl_main.c:53
CL_SendCmd
void CL_SendCmd(void)
Definition: cl_input.c:460
CL_ParticleEffect3
void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:995
cl_forwardspeed
cvar_t * cl_forwardspeed
Definition: cl_input.c:224
in_klook
kbutton_t in_klook
Definition: client.h:477
m_side
cvar_t * m_side
Definition: cl_main.c:70
CL_Disconnect
void CL_Disconnect(void)
Definition: cl_main.c:618
client_static_t::connect_time
float connect_time
Definition: client.h:220
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:98
Key_KeynumToString
char * Key_KeynumToString(int keynum)
Definition: keys.c:479
CL_AddNetgraph
void CL_AddNetgraph(void)
Definition: cl_scrn.c:96
cl_sustain::nextthink
int nextthink
Definition: client.h:332
gun_model
struct model_s * gun_model
Definition: cl_view.c:29
centity_t::trailcount
int trailcount
Definition: client.h:63
key_game
@ key_game
Definition: client.h:200
client_state_t::lerpfrac
float lerpfrac
Definition: client.h:129
CL_RunDLights
void CL_RunDLights(void)
Definition: cl_fx.c:211
IN_Accumulate
void IN_Accumulate(void)
cl_showmiss
cvar_t * cl_showmiss
Definition: cl_main.c:57
cl_add_particles
cvar_t * cl_add_particles
Definition: cl_main.c:51
refexport_t
Definition: ref.h:133
particle_s::alpha
float alpha
Definition: client.h:368
CL_ParticleSteamEffect
void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:749
CL_AddLightStyles
void CL_AddLightStyles(void)
Definition: cl_fx.c:114
client_static_t::downloadtype
dltype_t downloadtype
Definition: client.h:233
cdlight_t::color
vec3_t color
Definition: client.h:298
CL_BubbleTrail2
void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist)
Definition: cl_newfx.c:388
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:81
frame_t::valid
qboolean valid
Definition: client.h:45
client_state_t::timedemo_frames
int timedemo_frames
Definition: client.h:95
cl_timedemo
cvar_t * cl_timedemo
Definition: cl_main.c:61
cls
client_static_t cls
Definition: cl_main.c:90
CL_RegisterSounds
void CL_RegisterSounds(void)
Definition: cl_parse.c:176
CL_DiminishingTrail
void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
Definition: cl_fx.c:1435
key_console
@ key_console
Definition: client.h:200
frame_t::serverframe
int serverframe
Definition: client.h:46
client_static_t::serverProtocol
int serverProtocol
Definition: client.h:225
client_state_t::frame
frame_t frame
Definition: client.h:116
CL_ParseConfigString
void CL_ParseConfigString(void)
Definition: cl_parse.c:519
keydest_t
keydest_t
Definition: client.h:200
CMD_BACKUP
#define CMD_BACKUP
Definition: client.h:85
client_state_t
client_state_t
Definition: server.h:73
cl
client_state_t cl
Definition: cl_main.c:91
client_state_t::playernum
int playernum
Definition: client.h:156
client_state_t::predicted_step
float predicted_step
Definition: client.h:109
CL_ParticleEffect2
void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:955
MAX_ITEMS
#define MAX_ITEMS
Definition: q_shared.h:92
MAX_CLIENTWEAPONMODELS
#define MAX_CLIENTWEAPONMODELS
Definition: client.h:69
cmodel_s
Definition: q_shared.h:432
CL_RocketTrail
void CL_RocketTrail(vec3_t start, vec3_t end, centity_t *old)
Definition: cl_fx.c:1556
kbutton_t::msec
unsigned msec
Definition: client.h:473
dltype_t
dltype_t
Definition: client.h:192
client_state_t::baseclientinfo
clientinfo_t baseclientinfo
Definition: client.h:170
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
client_state_t::time
int time
Definition: client.h:127
CL_RunLightStyles
void CL_RunLightStyles(void)
Definition: cl_fx.c:66
cl_vwep
cvar_t * cl_vwep
Definition: cl_main.c:88
CL_InitPrediction
void CL_InitPrediction(void)
DrawAltString
void DrawAltString(int x, int y, char *s)
Definition: console.c:46
cl_showclamp
cvar_t * cl_showclamp
Definition: cl_main.c:58
dl_skin
@ dl_skin
Definition: client.h:196
CL_Record_f
void CL_Record_f(void)
Definition: cl_main.c:162
client_state_t::predicted_step_time
unsigned predicted_step_time
Definition: client.h:110
CL_FlagTrail
void CL_FlagTrail(vec3_t start, vec3_t end, float color)
Definition: cl_fx.c:1385
CL_ForceWall
void CL_ForceWall(vec3_t start, vec3_t end, int color)
Definition: cl_newfx.c:230
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:1119
name
cvar_t * name
Definition: cl_main.c:79
client_state_t::cinematicpalette_active
qboolean cinematicpalette_active
Definition: client.h:148
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:87
clientinfo_t::skin
struct image_s * skin
Definition: client.h:75
CL_ParticleEffect
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:916
connstate_t
connstate_t
Definition: client.h:184
s
static fixed16_t s
Definition: r_scan.c:30
y
GLint y
Definition: qgl_win.c:115
snd_miniaudio.h
cl_sustain::think
void(* think)(struct cl_sustain *self)
Definition: client.h:339
CL_Tracker_Shell
void CL_Tracker_Shell(vec3_t origin)
Definition: cl_newfx.c:898
CL_WriteToServer
void CL_WriteToServer(usercmd_t *cmd)
frame_t::playerstate
player_state_t playerstate
Definition: client.h:50
m_forward
cvar_t * m_forward
Definition: cl_main.c:69
MAX_PARSE_ENTITIES
#define MAX_PARSE_ENTITIES
Definition: client.h:312
client_static_t::demofile
FILE * demofile
Definition: client.h:239
IN_CenterView
void IN_CenterView(void)
Definition: cl_input.c:404
cl_autoskins
cvar_t * cl_autoskins
Definition: cl_main.c:43
CL_Heatbeam
void CL_Heatbeam(vec3_t start, vec3_t end)
Definition: cl_newfx.c:525
client_static_t::download
FILE * download
Definition: client.h:229
CL_TeleporterParticles
void CL_TeleporterParticles(entity_state_t *ent)
Definition: cl_fx.c:1033
cl_sustain_t
struct cl_sustain cl_sustain_t
centity_t::serverframe
int serverframe
Definition: client.h:61
client_state_t::parse_entities
int parse_entities
Definition: client.h:102
CL_ClearEffects
void CL_ClearEffects(void)
Definition: cl_fx.c:2301
dl_model
@ dl_model
Definition: client.h:194
client_static_t::framecount
int framecount
Definition: client.h:207
num_cl_weaponmodels
int num_cl_weaponmodels
Definition: cl_view.c:56
particle_s::colorvel
float colorvel
Definition: client.h:367
client_state_t::sound_prepped
qboolean sound_prepped
Definition: client.h:99
lookstrafe
cvar_t * lookstrafe
Definition: cl_main.c:64
usercmd_s
Definition: q_shared.h:517
CL_RegisterTEntModels
void CL_RegisterTEntModels(void)
Definition: cl_tent.c:172
SHOWNET
void SHOWNET(char *s)
Definition: cl_parse.c:650
CL_ParseFrame
void CL_ParseFrame(void)
Definition: cl_ents.c:663
sensitivity
cvar_t * sensitivity
Definition: cl_main.c:65
client_static_t::state
connstate_t state
Definition: client.h:204
client_state_t::cmd
usercmd_t cmd
Definition: client.h:104
entity_s
Definition: ref.h:49
cl_sustain::org
vec3_t org
Definition: client.h:334
clientinfo_t
Definition: client.h:71
client_static_t::frametime
float frametime
Definition: client.h:209
M_ForceMenuOff
void M_ForceMenuOff(void)
Definition: menu.c:123
CL_RegisterTEntSounds
void CL_RegisterTEntSounds(void)
Definition: cl_tent.c:125
M_Keydown
void M_Keydown(int key)
Definition: menu.c:4031
MAX_SOUNDS
#define MAX_SOUNDS
Definition: q_shared.h:90
cl_predict
cvar_t * cl_predict
Definition: cl_main.c:46
cl_footsteps
cvar_t * cl_footsteps
Definition: cl_main.c:44
CL_RequestNextDownload
void CL_RequestNextDownload(void)
Definition: cl_main.c:1120
CL_ParseMuzzleFlash2
void CL_ParseMuzzleFlash2(void)
Definition: cl_fx.c:429
CL_AddDLights
void CL_AddDLights(void)
Definition: cl_fx.c:812
cl_sustain::dir
vec3_t dir
Definition: client.h:335
CL_InitInput
void CL_InitInput(void)
Definition: cl_input.c:414
net_from
netadr_t net_from
Definition: net_chan.c:81
cdlight_t::minlight
float minlight
Definition: client.h:303
netadr_t
Definition: qcommon.h:551
cl_lightlevel
cvar_t * cl_lightlevel
Definition: cl_main.c:72
CL_ClearState
void CL_ClearState(void)
Definition: cl_main.c:595
CL_Download_f
void CL_Download_f(void)
Definition: cl_parse.c:132
frame_t::deltaframe
int deltaframe
Definition: client.h:48
lookspring
cvar_t * lookspring
Definition: cl_main.c:63
CL_ParseLayout
void CL_ParseLayout(void)
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:205
clientinfo_t::icon
struct image_s * icon
Definition: client.h:76
CL_ColorExplosionParticles
void CL_ColorExplosionParticles(vec3_t org, int color, int run)
Definition: cl_newfx.c:1156
V_Init
void V_Init(void)
Definition: cl_view.c:579
CL_IonripperTrail
void CL_IonripperTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1704
freelook
cvar_t * freelook
Definition: cl_main.c:24
ca_connected
@ ca_connected
Definition: client.h:188
cdlight_t::origin
vec3_t origin
Definition: client.h:299
client_state_t::cinematic_file
FILE * cinematic_file
Definition: client.h:144
M_AddToServerList
void M_AddToServerList(netadr_t adr, char *info)
Definition: menu.c:2239
player_state_t
Definition: q_shared.h:1174
cl_add_blend
cvar_t * cl_add_blend
Definition: cl_main.c:54
centity_t::current
entity_state_t current
Definition: client.h:58
cl_add_lights
cvar_t * cl_add_lights
Definition: cl_main.c:52
M_Draw
void M_Draw(void)
Definition: menu.c:3999
image_s
Definition: r_local.h:71
CL_Disconnect_f
void CL_Disconnect_f(void)
Definition: cl_main.c:665
cl_sidespeed
cvar_t * cl_sidespeed
Definition: cl_input.c:225
CL_SmokeAndFlash
void CL_SmokeAndFlash(vec3_t origin)
Definition: cl_tent.c:263
cl_sustain::color
int color
Definition: client.h:336
V_AddParticle
void V_AddParticle(vec3_t org, int color, float alpha)
Definition: cl_view.c:93
frame_t
Definition: client.h:43
CL_PredictMovement
void CL_PredictMovement(void)
Definition: cl_pred.c:199
client_state_t::surpressCount
int surpressCount
Definition: client.h:117
CL_FlameEffects
void CL_FlameEffects(centity_t *ent, vec3_t origin)
Definition: cl_newfx.c:279
CL_SetLightstyle
void CL_SetLightstyle(int i)
Definition: cl_fx.c:92
key_message
@ key_message
Definition: client.h:200
frame_t::servertime
int servertime
Definition: client.h:47
client_state_t
Definition: client.h:91
cl_weaponmodels
char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: cl_view.c:55
kbutton_t::downtime
unsigned downtime
Definition: client.h:472
CL_SendMove
void CL_SendMove(usercmd_t *cmd)
sound.h
CL_BigTeleportParticles
void CL_BigTeleportParticles(vec3_t org)
Definition: cl_fx.c:1195
cl_pitchspeed
cvar_t * cl_pitchspeed
Definition: cl_input.c:228
centity_t::prev
entity_state_t prev
Definition: client.h:59
MAX_IMAGES
#define MAX_IMAGES
Definition: q_shared.h:91
CL_SmokeTrail
void CL_SmokeTrail(vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing)
Definition: cl_newfx.c:187
input.h
CL_ReadPackets
void CL_ReadPackets(void)
Definition: cl_main.c:990
CL_Stop_f
void CL_Stop_f(void)
Definition: cl_main.c:134
CL_MonsterPlasma_Shell
void CL_MonsterPlasma_Shell(vec3_t origin)
Definition: cl_newfx.c:929
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
CL_EntityEvent
void CL_EntityEvent(entity_state_t *ent)
Definition: cl_fx.c:2266
particle_s::color
float color
Definition: client.h:366
CL_Init
void CL_Init(void)
Definition: cl_main.c:1785
kbutton_t
Definition: client.h:469
void
void(APIENTRY *qglAccum)(GLenum op
client_static_t::quakePort
int quakePort
Definition: client.h:222
count
GLint GLsizei count
Definition: qgl_win.c:128
V_RenderView
void V_RenderView(float stereo_separation)
Definition: cl_view.c:446
cl_sustain::thinkinterval
int thinkinterval
Definition: client.h:333
cl_shownet
cvar_t * cl_shownet
Definition: cl_main.c:56
V_AddLightStyle
void V_AddLightStyle(int style, float r, float g, float b)
Definition: cl_view.c:132
CL_PredictMove
void CL_PredictMove(void)
client_static_t::netchan
netchan_t netchan
Definition: client.h:224
in_mlook
kbutton_t in_mlook
client_static_t::realtime
int realtime
Definition: client.h:208
client_static_t::downloadpercent
int downloadpercent
Definition: client.h:234