icculus quake2 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 #ifdef __x86_64__
25 #define INT long int
26 #else
27 #define INT int
28 #endif
29 
30 #include <math.h>
31 #include <string.h>
32 #include <stdarg.h>
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include <ctype.h>
36 
37 #include "ref.h"
38 
39 #include "vid.h"
40 #include "screen.h"
41 #include "sound.h"
42 #include "input.h"
43 #include "keys.h"
44 #include "console.h"
45 #include "cdaudio.h"
46 
47 //=============================================================================
48 
49 #ifdef QMAX
50 #define random() ((rand () & 0x7fff) / ((float)0x7fff))
51 #define crandom() (2.0 * (random() - 0.5))
52 vec3_t clientOrg; //lerped org of client for server->client side effects
53 
54 void vectoangles2 (vec3_t value1, vec3_t angles);
55 
56 #include "particles.h"
57 
58 int color8red (int color8);
59 int color8green (int color8);
60 int color8blue (int color8);
61 #endif
62 
63 typedef struct
64 {
65  qboolean valid; // cleared if delta parsing was invalid
67  int servertime; // server time the message is valid for (in msec)
69  byte areabits[MAX_MAP_AREAS/8]; // portalarea visibility bits
72  int parse_entities; // non-masked index into cl_parse_entities array
73 } frame_t;
74 
75 typedef struct
76 {
77  entity_state_t baseline; // delta from this if not from a previous frame
79  entity_state_t prev; // will always be valid, but might just be a copy of current
80 
81  int serverframe; // if not current, this ent isn't in the frame
82 
83  int trailcount; // for diminishing grenade trails
84  vec3_t lerp_origin; // for trails (variable hz)
85 
87 } centity_t;
88 
89 #define MAX_CLIENTWEAPONMODELS 20 // PGM -- upped from 16 to fit the chainfist vwep
90 
91 typedef struct
92 {
93  char name[MAX_QPATH];
94  char cinfo[MAX_QPATH];
95  struct image_s *skin;
96  struct image_s *icon;
97  char iconname[MAX_QPATH];
98  struct model_s *model;
99  struct model_s *weaponmodel[MAX_CLIENTWEAPONMODELS];
100 } clientinfo_t;
101 
103 extern int num_cl_weaponmodels;
104 
105 #define CMD_BACKUP 64 // allow a lot of command backups for very fast systems
106 
107 //
108 // the client_state_t structure is wiped completely at every
109 // server map change
110 //
111 typedef struct
112 {
114 
117 
118  qboolean refresh_prepped; // false if on new level or new ref dll
119  qboolean sound_prepped; // ambient sounds can start
120  qboolean force_refdef; // vid has changed, so we can't use a paused refdef
121 
122  int parse_entities; // index (not anded off) into cl_parse_entities[]
123 
125  usercmd_t cmds[CMD_BACKUP]; // each mesage will send several old cmds
126  int cmd_time[CMD_BACKUP]; // time sent, for calculating pings
127  short predicted_origins[CMD_BACKUP][3]; // for debug comparing against server
128 
129  float predicted_step; // for stair up smoothing
131 
132  vec3_t predicted_origin; // generated by CL_PredictMovement
135 
136  frame_t frame; // received from server
137  int surpressCount; // number of messages rate supressed
139 
140  // the client maintains its own idea of view angles, which are
141  // sent to the server each frame. It is cleared to 0 upon entering each level.
142  // the server sends a delta each frame which is added to the locally
143  // tracked view angles to account for standing on rotating objects,
144  // and teleport direction changes
146 
147  int time; // this is the time value that the client
148  // is rendering at. always <= cls.realtime
149  float lerpfrac; // between oldframe and frame
150 
152 
153  vec3_t v_forward, v_right, v_up; // set when refdef.angles is set
154 
155  //
156  // transient data from server
157  //
158  char layout[1024]; // general 2D overlay
159  int inventory[MAX_ITEMS];
160 
161  //
162  // non-gameserver infornamtion
163  // FIXME: move this cinematic stuff into the cin_t structure
165  int cinematictime; // cls.realtime for first cinematic frame
167  unsigned char cinematicpalette[768];
169 
170  //
171  // server state information
172  //
173  qboolean attractloop; // running the attract loop, any key will menu
174  int servercount; // server identification for prespawns
175  char gamedir[MAX_QPATH];
177 
178  char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH];
179 
180  //
181  // locally derived information from server state
182  //
183  struct model_s *model_draw[MAX_MODELS];
184  struct cmodel_s *model_clip[MAX_MODELS];
185 
186  struct sfx_s *sound_precache[MAX_SOUNDS];
187  struct image_s *image_precache[MAX_IMAGES];
188 
192 
193 extern client_state_t cl;
194 
195 /*
196 ==================================================================
197 
198 the client_static_t structure is persistant through an arbitrary number
199 of server connections
200 
201 ==================================================================
202 */
203 
204 typedef enum {
206  ca_disconnected, // not talking to a server
207  ca_connecting, // sending request packets to the server
208  ca_connected, // netchan_t established, waiting for svc_serverdata
209  ca_active // game views should be displayed
210 } connstate_t;
211 
212 typedef enum {
218 } dltype_t; // download type
219 
221 
222 typedef struct
223 {
226 
228  int realtime; // always increasing, no clamping, etc
229  float frametime; // seconds since last frame
230 
231 // screen rendering information
232  float disable_screen; // showing loading plaque between levels
233  // or changing rendering dlls
234  // if time gets > 30 seconds ahead, break it
235  int disable_servercount; // when we receive a frame and cl.servercount
236  // > cls.disable_servercount, clear disable_screen
237 
238 // connection information
239  char servername[MAX_OSPATH]; // name of server from original connect
240  float connect_time; // for connection retransmits
241 
242  int quakePort; // a 16 bit value that allows quake servers
243  // to work around address translating routers
245  int serverProtocol; // in case we are doing some kind of version hack
246 
247  int challenge; // from the server to use for connecting
248 
249  FILE *download; // file transfer from server
250  char downloadtempname[MAX_OSPATH];
251  char downloadname[MAX_OSPATH];
255 
256 // demo recording info must be here, so it isn't cleared on level change
258  qboolean demowaiting; // don't record until a non-delta message is received
259  FILE *demofile;
261 
262 extern client_static_t cls;
263 
264 //=============================================================================
265 
266 //
267 // cvars
268 //
270 extern cvar_t *cl_stereo;
271 
272 extern cvar_t *cl_gun;
273 extern cvar_t *cl_add_blend;
274 extern cvar_t *cl_add_lights;
275 extern cvar_t *cl_add_particles;
276 extern cvar_t *cl_add_entities;
277 extern cvar_t *cl_predict;
278 extern cvar_t *cl_footsteps;
279 extern cvar_t *cl_noskins;
280 extern cvar_t *cl_autoskins;
281 
282 #ifdef QMAX
283 //psychospaz stuff
284 //railgun
285 extern cvar_t *cl_railred;
286 extern cvar_t *cl_railgreen;
287 extern cvar_t *cl_railblue;
288 extern cvar_t *cl_railtype;
289 //3dcam
290 extern cvar_t *cl_3dcam;
291 extern cvar_t *cl_3dcam_angle;
292 extern cvar_t *cl_3dcam_chase;
293 extern cvar_t *cl_3dcam_dist;
294 extern cvar_t *cl_3dcam_alpha;
295 extern cvar_t *cl_3dcam_adjust;
296 
297 extern cvar_t *cl_blood;
298 
299 #endif
300 
301 extern cvar_t *cl_upspeed;
302 extern cvar_t *cl_forwardspeed;
303 extern cvar_t *cl_sidespeed;
304 
305 extern cvar_t *cl_yawspeed;
306 extern cvar_t *cl_pitchspeed;
307 
308 extern cvar_t *cl_run;
309 
310 extern cvar_t *cl_anglespeedkey;
311 
312 extern cvar_t *cl_shownet;
313 extern cvar_t *cl_showmiss;
314 extern cvar_t *cl_showclamp;
315 
316 extern cvar_t *lookspring;
317 extern cvar_t *lookstrafe;
318 extern cvar_t *sensitivity;
319 
320 extern cvar_t *m_pitch;
321 extern cvar_t *m_yaw;
322 extern cvar_t *m_forward;
323 extern cvar_t *m_side;
324 
325 extern cvar_t *freelook;
326 
327 extern cvar_t *cl_lightlevel; // FIXME HACK
328 
329 extern cvar_t *cl_paused;
330 extern cvar_t *cl_timedemo;
331 
332 extern cvar_t *cl_vwep;
333 
334 typedef struct
335 {
336  int key; // so entities can reuse same entry
339  float radius;
340  float die; // stop lighting after this time
341  float decay; // drop this each second
342  float minlight; // don't add when contributing less
343 } cdlight_t;
344 
347 
348 // the cl_parse_entities must be large enough to hold UPDATE_BACKUP frames of
349 // entities, so that when a delta compressed message arives from the server
350 // it can be un-deltad from the original
351 #define MAX_PARSE_ENTITIES 1024
353 
354 //=============================================================================
355 
356 extern netadr_t net_from;
357 extern sizebuf_t net_message;
358 
359 void DrawString (int x, int y, char *s);
360 void DrawAltString (int x, int y, char *s); // toggle high bit
361 qboolean CL_CheckOrDownloadFile (char *filename);
362 
363 void CL_AddNetgraph (void);
364 
365 //ROGUE
366 typedef struct cl_sustain
367 {
368  int id;
369  int type;
370  int endtime;
375  int color;
376  int count;
378  void (*think)(struct cl_sustain *self);
379 } cl_sustain_t;
380 
381 #define MAX_SUSTAINS 32
383 
385 void CL_ParticleEffect (vec3_t org, vec3_t dir, int color, int count);
386 void CL_ParticleEffect2 (vec3_t org, vec3_t dir, int color, int count);
387 
388 // RAFAEL
389 void CL_ParticleEffect3 (vec3_t org, vec3_t dir, int color, int count);
390 
391 
392 //=================================================
393 
394 #ifdef QMAX
395 
396 typedef struct
397 {
398  qboolean isactive;
399 
400  vec3_t lightcol;
401  float light;
402  float lightvel;
403 } cplight_t;
404 #define P_LIGHTS_MAX 8
405 #endif
406 
407 // ========
408 // PGM
409 typedef struct particle_s
410 {
411  struct particle_s *next;
412 
413  float time;
414 
418 #ifdef QMAX
419  vec3_t color;
421 #else
422  float color;
423  float colorvel;
424 #endif
425  float alpha;
426  float alphavel;
427 
428 #ifdef QMAX
429  cplight_t lights[P_LIGHTS_MAX];
430 
431  float start;
432  float size;
433  float sizevel;
434 
435  vec3_t angle;
436 
437  int image;
438  int flags;
439 
440  vec3_t oldorg;
441  float temp;
442  int src_ent;
443  int dst_ent;
444 
445  struct particle_s *link;
446 
447  void (*think)(struct particle_s *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time);
448  qboolean thinknext;
449 #endif
450 } cparticle_t;
451 
452 
453 #define PARTICLE_GRAVITY 40
454 #define BLASTER_PARTICLE_COLOR 0xe0
455 // PMM
456 #define INSTANT_PARTICLE -10000.0
457 // PGM
458 // ========
459 
460 void CL_ClearEffects (void);
461 void CL_ClearTEnts (void);
462 void CL_BlasterTrail (vec3_t start, vec3_t end);
463 void CL_QuadTrail (vec3_t start, vec3_t end);
464 void CL_RailTrail (vec3_t start, vec3_t end);
465 void CL_BubbleTrail (vec3_t start, vec3_t end);
466 #ifdef QMAX
467 void CL_FlagTrail (vec3_t start, vec3_t end, qboolean isred);
468 #else
469 void CL_FlagTrail (vec3_t start, vec3_t end, float color);
470 #endif
471 
472 // RAFAEL
473 void CL_IonripperTrail (vec3_t start, vec3_t end);
474 
475 // ========
476 // PGM
477 void CL_BlasterParticles2 (vec3_t org, vec3_t dir, unsigned int color);
478 void CL_BlasterTrail2 (vec3_t start, vec3_t end);
479 void CL_DebugTrail (vec3_t start, vec3_t end);
480 void CL_SmokeTrail (vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing);
481 void CL_Flashlight (int ent, vec3_t pos);
482 void CL_ForceWall (vec3_t start, vec3_t end, int color);
483 void CL_FlameEffects (centity_t *ent, vec3_t origin);
484 void CL_GenericParticleEffect (vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel);
485 void CL_BubbleTrail2 (vec3_t start, vec3_t end, int dist);
486 void CL_Heatbeam (vec3_t start, vec3_t end);
487 void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude);
488 void CL_TrackerTrail (vec3_t start, vec3_t end, int particleColor);
489 void CL_Tracker_Explode(vec3_t origin);
490 void CL_TagTrail (vec3_t start, vec3_t end, float color);
491 void CL_ColorFlash (vec3_t pos, int ent, int intensity, float r, float g, float b);
492 void CL_Tracker_Shell(vec3_t origin);
493 void CL_MonsterPlasma_Shell(vec3_t origin);
494 void CL_ColorExplosionParticles (vec3_t org, int color, int run);
495 void CL_ParticleSmokeEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude);
496 void CL_Widowbeamout (cl_sustain_t *self);
497 void CL_Nukeblast (cl_sustain_t *self);
498 void CL_WidowSplash (vec3_t org);
499 // PGM
500 // ========
501 
502 int CL_ParseEntityBits (unsigned *bits);
503 void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int number, int bits);
504 void CL_ParseFrame (void);
505 
506 void CL_ParseTEnt (void);
507 void CL_ParseConfigString (void);
508 void CL_ParseMuzzleFlash (void);
509 void CL_ParseMuzzleFlash2 (void);
510 void SmokeAndFlash(vec3_t origin);
511 
512 void CL_SetLightstyle (int i);
513 
514 void CL_RunParticles (void);
515 void CL_RunDLights (void);
516 void CL_RunLightStyles (void);
517 
518 void CL_AddEntities (void);
519 void CL_AddDLights (void);
520 void CL_AddTEnts (void);
521 void CL_AddLightStyles (void);
522 
523 //=================================================
524 
525 void CL_PrepRefresh (void);
526 void CL_RegisterSounds (void);
527 
528 void CL_Quit_f (void);
529 
530 void IN_Accumulate (void);
531 
532 void CL_ParseLayout (void);
533 
534 
535 //
536 // cl_main
537 //
538 extern refexport_t re; // interface to refresh .dll
539 
540 void CL_Init (void);
541 
542 void CL_FixUpGender(void);
543 void CL_Disconnect (void);
544 void CL_Disconnect_f (void);
545 void CL_GetChallengePacket (void);
546 void CL_PingServers_f (void);
547 void CL_Snd_Restart_f (void);
548 void CL_RequestNextDownload (void);
549 
550 //
551 // cl_input
552 //
553 typedef struct
554 {
555  int down[2]; // key nums holding it down
556  unsigned downtime; // msec timestamp
557  unsigned msec; // msec down this frame
558  int state;
559 } kbutton_t;
560 
562 extern kbutton_t in_strafe;
563 extern kbutton_t in_speed;
564 
565 void CL_InitInput (void);
566 void CL_SendCmd (void);
567 void CL_SendMove (usercmd_t *cmd);
568 
569 void CL_ClearState (void);
570 
571 void CL_ReadPackets (void);
572 
573 int CL_ReadFromServer (void);
574 void CL_WriteToServer (usercmd_t *cmd);
575 void CL_BaseMove (usercmd_t *cmd);
576 
577 void IN_CenterView (void);
578 
579 float CL_KeyState (kbutton_t *key);
580 char *Key_KeynumToString (int keynum);
581 
582 //
583 // cl_demo.c
584 //
585 void CL_WriteDemoMessage (void);
586 void CL_Stop_f (void);
587 void CL_Record_f (void);
588 
589 //
590 // cl_parse.c
591 //
592 extern char *svc_strings[256];
593 
594 void CL_ParseServerMessage (void);
595 void CL_LoadClientinfo (clientinfo_t *ci, char *s);
596 void SHOWNET(char *s);
597 void CL_ParseClientinfo (int player);
598 void CL_Download_f (void);
599 
600 //
601 // cl_view.c
602 //
603 extern int gun_frame;
604 extern struct model_s *gun_model;
605 
606 void V_Init (void);
607 void V_RenderView( float stereo_separation );
608 void V_AddEntity (entity_t *ent);
609 #ifdef QMAX
610 void V_AddParticle (vec3_t org, vec3_t angle, vec3_t color, float alpha, float size, int image, int flags);
611 #else
612 void V_AddParticle (vec3_t org, int color, float alpha);
613 #endif
614 void V_AddLight (vec3_t org, float intensity, float r, float g, float b);
615 void V_AddLightStyle (int style, float r, float g, float b);
616 
617 //
618 // cl_tent.c
619 //
620 void CL_RegisterTEntSounds (void);
621 void CL_RegisterTEntModels (void);
622 void CL_SmokeAndFlash(vec3_t origin);
623 
624 
625 //
626 // cl_pred.c
627 //
628 void CL_InitPrediction (void);
629 void CL_PredictMove (void);
630 void CL_CheckPredictionError (void);
631 
632 //
633 // cl_fx.c
634 //
635 cdlight_t *CL_AllocDlight (int key);
637 void CL_RocketTrail (vec3_t start, vec3_t end, centity_t *old);
638 void CL_DiminishingTrail (vec3_t start, vec3_t end, centity_t *old, int flags);
639 void CL_FlyEffect (centity_t *ent, vec3_t origin);
640 void CL_BfgParticles (entity_t *ent);
641 void CL_AddParticles (void);
642 void CL_EntityEvent (entity_state_t *ent);
643 // RAFAEL
644 void CL_TrapParticles (entity_t *ent);
645 
646 //
647 // menus
648 //
649 void M_Init (void);
650 void M_Keydown (int key);
651 void M_Draw (void);
652 void M_Menu_Main_f (void);
653 void M_ForceMenuOff (void);
654 void M_AddToServerList (netadr_t adr, char *info);
655 
656 //
657 // cl_inv.c
658 //
659 void CL_ParseInventory (void);
660 void CL_KeyInventory (int key);
661 void CL_DrawInventory (void);
662 
663 //
664 // cl_pred.c
665 //
666 void CL_PredictMovement (void);
667 
668 #if id386
669 void x86_TimerStart( void );
670 void x86_TimerStop( void );
671 void x86_TimerInit( unsigned long smallest, unsigned longest );
672 unsigned long *x86_TimerGetHistogram( void );
673 #endif
674 
675 
676 #ifdef QMAX
677 void SetParticleImages (void);
678 #endif
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:79
CL_BubbleTrail
void CL_BubbleTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1909
dl_single
@ dl_single
Definition: client.h:217
CL_ParticleSmokeEffect
void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:1331
CL_AddParticles
void CL_AddParticles(void)
Definition: cl_fx.c:2332
particle_s::vel
vec3_t vel
Definition: client.h:416
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:400
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:132
client_static_t::challenge
int challenge
Definition: client.h:247
sizebuf_s
Definition: qcommon.h:75
cl_upspeed
cvar_t * cl_upspeed
Definition: cl_input.c:222
cdlight_t::decay
float decay
Definition: client.h:341
m_yaw
cvar_t * m_yaw
Definition: cl_main.c:83
client_state_t::servercount
int servercount
Definition: client.h:174
ref.h
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
MAX_MODELS
#define MAX_MODELS
Definition: q_shared.h:82
vid.h
MAX_DLIGHTS
#define MAX_DLIGHTS
Definition: ref.h:25
CL_ReadFromServer
int CL_ReadFromServer(void)
refdef_t
Definition: ref.h:120
centity_t::fly_stoptime
int fly_stoptime
Definition: client.h:86
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:112
dl_none
@ dl_none
Definition: client.h:213
CL_KeyInventory
void CL_KeyInventory(int key)
client_state_t::attractloop
qboolean attractloop
Definition: client.h:173
CL_AllocDlight
cdlight_t * CL_AllocDlight(int key)
Definition: cl_fx.c:249
cdlight_t::radius
float radius
Definition: client.h:339
cl_parse_entities
entity_state_t cl_parse_entities[MAX_PARSE_ENTITIES]
Definition: cl_main.c:110
kbutton_t::state
int state
Definition: client.h:558
dl_sound
@ dl_sound
Definition: client.h:215
CL_RailTrail
void CL_RailTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1750
client_static_t::disable_screen
float disable_screen
Definition: client.h:232
cl_sustain::magnitude
int magnitude
Definition: client.h:377
CL_DrawInventory
void CL_DrawInventory(void)
Definition: cl_inv.c:70
cl_sustain::type
int type
Definition: client.h:369
cl_run
cvar_t * cl_run
Definition: cl_input.c:229
cl_anglespeedkey
cvar_t * cl_anglespeedkey
Definition: cl_input.c:231
cl_dlights
cdlight_t cl_dlights[MAX_DLIGHTS]
Definition: cl_fx.c:231
particle_s::time
float time
Definition: client.h:413
ca_disconnected
@ ca_disconnected
Definition: client.h:206
client_state_t::v_up
vec3_t v_up
Definition: client.h:153
cl_sustain
Definition: client.h:366
particle_s::accel
vec3_t accel
Definition: client.h:417
keys.h
CL_Widowbeamout
void CL_Widowbeamout(cl_sustain_t *self)
Definition: cl_newfx.c:1062
cl_sustain::count
int count
Definition: client.h:376
CL_ClearTEnts
void CL_ClearTEnts(void)
Definition: cl_tent.c:229
M_Menu_Main_f
void M_Menu_Main_f(void)
Definition: menu.c:494
entity_state_s
Definition: q_shared.h:1169
cdlight_t::die
float die
Definition: client.h:340
CL_RunParticles
void CL_RunParticles(void)
client_state_t::timeoutcount
int timeoutcount
Definition: client.h:113
frame_t::parse_entities
int parse_entities
Definition: client.h:72
ca_uninitialized
@ ca_uninitialized
Definition: client.h:205
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:2026
ca_connecting
@ ca_connecting
Definition: client.h:207
model_s::flags
int flags
Definition: r_model.h:180
CL_BfgParticles
void CL_BfgParticles(entity_t *ent)
Definition: cl_fx.c:2065
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:276
client_state_t::prediction_error
vec3_t prediction_error
Definition: client.h:134
cl_sustain::id
int id
Definition: client.h:368
cl_sustain::endtime
int endtime
Definition: client.h:370
cdlight_t
Definition: client.h:334
client_state_t::predicted_angles
vec3_t predicted_angles
Definition: client.h:133
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:190
screen.h
in_strafe
kbutton_t in_strafe
Definition: cl_input.c:60
qboolean
qboolean
Definition: q_shared.h:56
x
GLint GLenum GLint x
Definition: qgl_win.c:116
client_state_t::viewangles
vec3_t viewangles
Definition: client.h:145
client_static_t::disable_servercount
int disable_servercount
Definition: client.h:235
CL_ParseTEnt
void CL_ParseTEnt(void)
Definition: cl_tent.c:740
CL_TagTrail
void CL_TagTrail(vec3_t start, vec3_t end, float color)
Definition: cl_newfx.c:1218
i
int i
Definition: q_shared.c:305
CL_TrapParticles
void CL_TrapParticles(entity_t *ent)
Definition: cl_fx.c:2135
CL_BlasterTrail
void CL_BlasterTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1403
CL_ParseServerMessage
void CL_ParseServerMessage(void)
Definition: cl_parse.c:664
sfx_s
Definition: snd_loc.h:39
cl_paused
cvar_t * cl_paused
Definition: cl_main.c:75
CL_WidowSplash
void CL_WidowSplash(vec3_t org)
Definition: cl_newfx.c:1140
client_static_t::demorecording
qboolean demorecording
Definition: client.h:257
frame_t::num_entities
int num_entities
Definition: client.h:71
ca_active
@ ca_active
Definition: client.h:209
netchan_t
Definition: qcommon.h:574
CL_PingServers_f
void CL_PingServers_f(void)
Definition: cl_main.c:817
model_s
Definition: r_model.h:171
CL_Snd_Restart_f
void CL_Snd_Restart_f(void)
Definition: cl_main.c:1119
particle_s::org
vec3_t org
Definition: client.h:415
CL_FixUpGender
void CL_FixUpGender(void)
Definition: cl_main.c:1074
client_state_t::cinematictime
int cinematictime
Definition: client.h:165
CL_Tracker_Explode
void CL_Tracker_Explode(vec3_t origin)
Definition: cl_newfx.c:1177
cdlight_t::key
int key
Definition: client.h:336
CL_CheckPredictionError
void CL_CheckPredictionError(void)
Definition: cl_pred.c:29
CL_ParseClientinfo
void CL_ParseClientinfo(int player)
Definition: cl_parse.c:508
CL_ParticleSteamEffect2
void CL_ParticleSteamEffect2(cl_sustain_t *self)
Definition: cl_newfx.c:888
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:151
centity_t::baseline
entity_state_t baseline
Definition: client.h:77
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, char *s)
Definition: cl_parse.c:387
CL_Flashlight
void CL_Flashlight(int ent, vec3_t pos)
Definition: cl_newfx.c:93
CL_TrackerTrail
void CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
Definition: cl_newfx.c:941
CL_Nukeblast
void CL_Nukeblast(cl_sustain_t *self)
Definition: cl_newfx.c:1101
cvar_s
Definition: q_shared.h:317
CL_GetChallengePacket
void CL_GetChallengePacket(void)
CL_ParseInventory
void CL_ParseInventory(void)
Definition: cl_inv.c:29
client_state_t::force_refdef
qboolean force_refdef
Definition: client.h:120
key_menu
@ key_menu
Definition: client.h:220
intensity
cvar_t * intensity
Definition: gl_image.c:30
CL_BlasterParticles2
void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color)
Definition: cl_newfx.c:1378
vectoangles2
void vectoangles2(vec3_t value1, vec3_t angles)
Definition: cl_newfx.c:54
DrawString
void DrawString(int x, int y, char *s)
Definition: console.c:35
cdaudio.h
client_static_t
Definition: client.h:222
particle_s::next
struct particle_s * next
Definition: client.h:411
centity_t::lerp_origin
vec3_t lerp_origin
Definition: client.h:84
client_state_t::cinematicframe
int cinematicframe
Definition: client.h:166
m_pitch
cvar_t * m_pitch
Definition: cl_main.c:82
cl_yawspeed
cvar_t * cl_yawspeed
Definition: cl_input.c:226
client_state_t::timedemo_start
int timedemo_start
Definition: client.h:116
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:108
gun_frame
int gun_frame
Definition: cl_view.c:28
CL_WriteDemoMessage
void CL_WriteDemoMessage(void)
Definition: cl_main.c:128
re
refexport_t re
Definition: vid_dll.c:31
CL_KeyState
float CL_KeyState(kbutton_t *key)
Definition: cl_input.c:185
CL_QuadTrail
void CL_QuadTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1456
particle_s::alphavel
float alphavel
Definition: client.h:426
color8green
int color8green(int color8)
Definition: cl_fxmax.c:97
particle_s
Definition: client.h:409
CL_BlasterTrail2
void CL_BlasterTrail2(vec3_t start, vec3_t end)
Definition: cl_newfx.c:1421
CL_Quit_f
void CL_Quit_f(void)
Definition: cl_main.c:399
V_AddLight
void V_AddLight(vec3_t org, float intensity, float r, float g, float b)
Definition: cl_view.c:157
CL_DebugTrail
void CL_DebugTrail(vec3_t start, vec3_t end)
Definition: cl_newfx.c:140
clientinfo_t::model
struct model_s * model
Definition: client.h:98
CL_AddEntities
void CL_AddEntities(void)
Definition: cl_ents.c:1495
in_speed
kbutton_t in_speed
Definition: cl_input.c:60
client_static_t::downloadnumber
int downloadnumber
Definition: client.h:252
r
GLdouble GLdouble r
Definition: qgl_win.c:336
V_AddEntity
void V_AddEntity(entity_t *ent)
Definition: cl_view.c:97
CL_ParseMuzzleFlash
void CL_ParseMuzzleFlash(void)
Definition: cl_fx.c:338
centity_t
Definition: client.h:75
client_static_t::demowaiting
qboolean demowaiting
Definition: client.h:258
CL_PrepRefresh
void CL_PrepRefresh(void)
Definition: cl_view.c:296
CL_AddTEnts
void CL_AddTEnts(void)
Definition: cl_tent.c:2029
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:50
M_Init
void M_Init(void)
Definition: menu.c:4019
cl_add_entities
cvar_t * cl_add_entities
Definition: cl_main.c:68
CL_SendCmd
void CL_SendCmd(void)
Definition: cl_input.c:459
CL_ParticleEffect3
void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1101
cl_forwardspeed
cvar_t * cl_forwardspeed
Definition: cl_input.c:223
in_klook
kbutton_t in_klook
Definition: client.h:561
m_side
cvar_t * m_side
Definition: cl_main.c:85
CL_Disconnect
void CL_Disconnect(void)
Definition: cl_main.c:633
client_static_t::connect_time
float connect_time
Definition: client.h:240
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:118
Key_KeynumToString
char * Key_KeynumToString(int keynum)
Definition: keys.c:482
CL_AddNetgraph
void CL_AddNetgraph(void)
Definition: cl_scrn.c:98
cl_sustain::nextthink
int nextthink
Definition: client.h:371
gun_model
struct model_s * gun_model
Definition: cl_view.c:29
centity_t::trailcount
int trailcount
Definition: client.h:83
key_game
@ key_game
Definition: client.h:220
client_state_t::lerpfrac
float lerpfrac
Definition: client.h:149
CL_RunDLights
void CL_RunDLights(void)
Definition: cl_fx.c:311
IN_Accumulate
void IN_Accumulate(void)
cl_showmiss
cvar_t * cl_showmiss
Definition: cl_main.c:72
cl_add_particles
cvar_t * cl_add_particles
Definition: cl_main.c:66
refexport_t
Definition: ref.h:151
particle_s::alpha
float alpha
Definition: client.h:425
CL_ParticleSteamEffect
void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:844
CL_AddLightStyles
void CL_AddLightStyles(void)
Definition: cl_fx.c:214
client_static_t::downloadtype
dltype_t downloadtype
Definition: client.h:253
cdlight_t::color
vec3_t color
Definition: client.h:337
CL_BubbleTrail2
void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist)
Definition: cl_newfx.c:445
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:74
frame_t::valid
qboolean valid
Definition: client.h:65
client_state_t::timedemo_frames
int timedemo_frames
Definition: client.h:115
cl_timedemo
cvar_t * cl_timedemo
Definition: cl_main.c:76
cls
client_static_t cls
Definition: cl_main.c:105
CL_RegisterSounds
void CL_RegisterSounds(void)
Definition: cl_parse.c:183
CL_DiminishingTrail
void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
Definition: cl_fx.c:1564
key_console
@ key_console
Definition: client.h:220
frame_t::serverframe
int serverframe
Definition: client.h:66
client_static_t::serverProtocol
int serverProtocol
Definition: client.h:245
client_state_t::frame
frame_t frame
Definition: client.h:136
CL_ParseConfigString
void CL_ParseConfigString(void)
Definition: cl_parse.c:526
keydest_t
keydest_t
Definition: client.h:220
CMD_BACKUP
#define CMD_BACKUP
Definition: client.h:105
client_state_t
client_state_t
Definition: server.h:73
cl
client_state_t cl
Definition: cl_main.c:106
client_state_t::playernum
int playernum
Definition: client.h:176
client_state_t::predicted_step
float predicted_step
Definition: client.h:129
CL_ParticleEffect2
void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1055
MAX_ITEMS
#define MAX_ITEMS
Definition: q_shared.h:85
MAX_CLIENTWEAPONMODELS
#define MAX_CLIENTWEAPONMODELS
Definition: client.h:89
cmodel_s
Definition: q_shared.h:428
CL_RocketTrail
void CL_RocketTrail(vec3_t start, vec3_t end, centity_t *old)
Definition: cl_fx.c:1691
kbutton_t::msec
unsigned msec
Definition: client.h:557
dltype_t
dltype_t
Definition: client.h:212
client_state_t::baseclientinfo
clientinfo_t baseclientinfo
Definition: client.h:190
color8red
int color8red(int color8)
Definition: cl_fxmax.c:93
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
client_state_t::time
int time
Definition: client.h:147
CL_RunLightStyles
void CL_RunLightStyles(void)
Definition: cl_fx.c:166
cl_vwep
cvar_t * cl_vwep
Definition: cl_main.c:103
CL_InitPrediction
void CL_InitPrediction(void)
DrawAltString
void DrawAltString(int x, int y, char *s)
Definition: console.c:49
cl_showclamp
cvar_t * cl_showclamp
Definition: cl_main.c:73
dl_skin
@ dl_skin
Definition: client.h:216
CL_Record_f
void CL_Record_f(void)
Definition: cl_main.c:175
client_state_t::predicted_step_time
unsigned predicted_step_time
Definition: client.h:130
CL_FlagTrail
void CL_FlagTrail(vec3_t start, vec3_t end, float color)
Definition: cl_fx.c:1511
CL_ForceWall
void CL_ForceWall(vec3_t start, vec3_t end, int color)
Definition: cl_newfx.c:261
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:1143
name
cvar_t * name
Definition: cl_main.c:94
client_state_t::cinematicpalette_active
qboolean cinematicpalette_active
Definition: client.h:168
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:80
clientinfo_t::skin
struct image_s * skin
Definition: client.h:95
CL_ParticleEffect
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1011
connstate_t
connstate_t
Definition: client.h:204
y
GLint y
Definition: qgl_win.c:115
cl_sustain::think
void(* think)(struct cl_sustain *self)
Definition: client.h:378
CL_Tracker_Shell
void CL_Tracker_Shell(vec3_t origin)
Definition: cl_newfx.c:997
CL_WriteToServer
void CL_WriteToServer(usercmd_t *cmd)
frame_t::playerstate
player_state_t playerstate
Definition: client.h:70
m_forward
cvar_t * m_forward
Definition: cl_main.c:84
MAX_PARSE_ENTITIES
#define MAX_PARSE_ENTITIES
Definition: client.h:351
client_static_t::demofile
FILE * demofile
Definition: client.h:259
IN_CenterView
void IN_CenterView(void)
Definition: cl_input.c:403
particles.h
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:615
client_static_t::download
FILE * download
Definition: client.h:249
CL_TeleporterParticles
void CL_TeleporterParticles(entity_state_t *ent)
Definition: cl_fx.c:1145
cl_sustain_t
struct cl_sustain cl_sustain_t
centity_t::serverframe
int serverframe
Definition: client.h:81
client_state_t::parse_entities
int parse_entities
Definition: client.h:122
CL_ClearEffects
void CL_ClearEffects(void)
Definition: cl_fx.c:2445
dl_model
@ dl_model
Definition: client.h:214
client_static_t::framecount
int framecount
Definition: client.h:227
num_cl_weaponmodels
int num_cl_weaponmodels
Definition: cl_view.c:55
particle_s::colorvel
float colorvel
Definition: client.h:423
client_state_t::sound_prepped
qboolean sound_prepped
Definition: client.h:119
lookstrafe
cvar_t * lookstrafe
Definition: cl_main.c:79
usercmd_s
Definition: q_shared.h:513
CL_RegisterTEntModels
void CL_RegisterTEntModels(void)
Definition: cl_tent.c:188
SHOWNET
void SHOWNET(char *s)
Definition: cl_parse.c:653
CL_ParseFrame
void CL_ParseFrame(void)
Definition: cl_ents.c:676
sensitivity
cvar_t * sensitivity
Definition: cl_main.c:80
client_static_t::state
connstate_t state
Definition: client.h:224
client_state_t::cmd
usercmd_t cmd
Definition: client.h:124
SetParticleImages
void SetParticleImages(void)
Definition: cl_fxmax.c:54
entity_s
Definition: ref.h:49
cl_sustain::org
vec3_t org
Definition: client.h:373
color8blue
int color8blue(int color8)
Definition: cl_fxmax.c:101
clientinfo_t
Definition: client.h:91
client_static_t::frametime
float frametime
Definition: client.h:229
M_ForceMenuOff
void M_ForceMenuOff(void)
Definition: menu.c:117
CL_RegisterTEntSounds
void CL_RegisterTEntSounds(void)
Definition: cl_tent.c:141
M_Keydown
void M_Keydown(int key)
Definition: menu.c:4077
MAX_SOUNDS
#define MAX_SOUNDS
Definition: q_shared.h:83
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:1141
CL_ParseMuzzleFlash2
void CL_ParseMuzzleFlash2(void)
Definition: cl_fx.c:529
CL_AddDLights
void CL_AddDLights(void)
Definition: cl_fx.c:912
cl_sustain::dir
vec3_t dir
Definition: client.h:374
CL_InitInput
void CL_InitInput(void)
Definition: cl_input.c:413
net_from
netadr_t net_from
Definition: net_chan.c:81
cdlight_t::minlight
float minlight
Definition: client.h:342
netadr_t
Definition: qcommon.h:538
cl_lightlevel
cvar_t * cl_lightlevel
Definition: cl_main.c:87
CL_ClearState
void CL_ClearState(void)
Definition: cl_main.c:610
CL_Download_f
void CL_Download_f(void)
Definition: cl_parse.c:139
frame_t::deltaframe
int deltaframe
Definition: client.h:68
lookspring
cvar_t * lookspring
Definition: cl_main.c:78
CL_ParseLayout
void CL_ParseLayout(void)
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:225
clientinfo_t::icon
struct image_s * icon
Definition: client.h:96
CL_ColorExplosionParticles
void CL_ColorExplosionParticles(vec3_t org, int color, int run)
Definition: cl_newfx.c:1269
V_Init
void V_Init(void)
Definition: cl_view.c:642
CL_IonripperTrail
void CL_IonripperTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1844
freelook
cvar_t * freelook
Definition: cl_main.c:24
ca_connected
@ ca_connected
Definition: client.h:208
cdlight_t::origin
vec3_t origin
Definition: client.h:338
client_state_t::cinematic_file
FILE * cinematic_file
Definition: client.h:164
M_AddToServerList
void M_AddToServerList(netadr_t adr, char *info)
Definition: menu.c:2281
player_state_t
Definition: q_shared.h:1198
cl_add_blend
cvar_t * cl_add_blend
Definition: cl_main.c:69
centity_t::current
entity_state_t current
Definition: client.h:78
cl_add_lights
cvar_t * cl_add_lights
Definition: cl_main.c:67
M_Draw
void M_Draw(void)
Definition: menu.c:4045
image_s
Definition: r_local.h:65
CL_Disconnect_f
void CL_Disconnect_f(void)
Definition: cl_main.c:680
cl_sidespeed
cvar_t * cl_sidespeed
Definition: cl_input.c:224
CL_SmokeAndFlash
void CL_SmokeAndFlash(vec3_t origin)
Definition: cl_tent.c:292
cl_sustain::color
int color
Definition: client.h:375
V_AddParticle
void V_AddParticle(vec3_t org, int color, float alpha)
Definition: cl_view.c:139
frame_t
Definition: client.h:63
CL_PredictMovement
void CL_PredictMovement(void)
Definition: cl_pred.c:199
client_state_t::surpressCount
int surpressCount
Definition: client.h:137
CL_FlameEffects
void CL_FlameEffects(centity_t *ent, vec3_t origin)
Definition: cl_newfx.c:331
CL_SetLightstyle
void CL_SetLightstyle(int i)
Definition: cl_fx.c:192
key_message
@ key_message
Definition: client.h:220
frame_t::servertime
int servertime
Definition: client.h:67
client_state_t
Definition: client.h:111
cl_weaponmodels
char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: cl_view.c:54
kbutton_t::downtime
unsigned downtime
Definition: client.h:556
CL_SendMove
void CL_SendMove(usercmd_t *cmd)
sound.h
CL_BigTeleportParticles
void CL_BigTeleportParticles(vec3_t org)
Definition: cl_fx.c:1313
cl_pitchspeed
cvar_t * cl_pitchspeed
Definition: cl_input.c:227
centity_t::prev
entity_state_t prev
Definition: client.h:79
MAX_IMAGES
#define MAX_IMAGES
Definition: q_shared.h:84
CL_SmokeTrail
void CL_SmokeTrail(vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing)
Definition: cl_newfx.c:216
input.h
CL_ReadPackets
void CL_ReadPackets(void)
Definition: cl_main.c:1011
CL_Stop_f
void CL_Stop_f(void)
Definition: cl_main.c:147
CL_MonsterPlasma_Shell
void CL_MonsterPlasma_Shell(vec3_t origin)
Definition: cl_newfx.c:1029
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
CL_EntityEvent
void CL_EntityEvent(entity_state_t *ent)
Definition: cl_fx.c:2410
particle_s::color
float color
Definition: client.h:422
CL_Init
void CL_Init(void)
Definition: cl_main.c:1823
kbutton_t
Definition: client.h:553
void
void(APIENTRY *qglAccum)(GLenum op
client_static_t::quakePort
int quakePort
Definition: client.h:242
count
GLint GLsizei count
Definition: qgl_win.c:128
V_RenderView
void V_RenderView(float stereo_separation)
Definition: cl_view.c:516
cl_sustain::thinkinterval
int thinkinterval
Definition: client.h:372
cl_shownet
cvar_t * cl_shownet
Definition: cl_main.c:71
V_AddLightStyle
void V_AddLightStyle(int style, float r, float g, float b)
Definition: cl_view.c:178
CL_PredictMove
void CL_PredictMove(void)
client_static_t::netchan
netchan_t netchan
Definition: client.h:244
in_mlook
kbutton_t in_mlook
client_static_t::realtime
int realtime
Definition: client.h:228
client_static_t::downloadpercent
int downloadpercent
Definition: client.h:254