Quake II RTX 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 modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (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. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18 
19 // client.h -- primary header for client
20 
21 #include "shared/shared.h"
22 #include "shared/list.h"
23 
24 #include "common/bsp.h"
25 #include "common/cmd.h"
26 #include "common/cmodel.h"
27 #include "common/common.h"
28 #include "common/cvar.h"
29 #include "common/field.h"
30 #include "common/files.h"
31 #include "common/pmove.h"
32 #include "common/math.h"
33 #include "common/msg.h"
34 #include "common/net/chan.h"
35 #include "common/net/net.h"
36 #include "common/prompt.h"
37 #include "common/protocol.h"
38 #include "common/sizebuf.h"
39 #include "common/zone.h"
40 
41 #include "system/system.h"
42 #include "refresh/refresh.h"
43 #include "server/server.h"
44 
45 #include "client/client.h"
46 #include "client/input.h"
47 #include "client/keys.h"
48 #include "client/sound/sound.h"
49 #include "client/ui.h"
50 #include "client/video.h"
51 
52 #if USE_ZLIB
53 #include <zlib.h>
54 #endif
55 
56 //=============================================================================
57 
58 #define MAX_EXPLOSIONS 32
59 
60 typedef struct {
61  enum {
71  ex_flare
72  } type;
73 
74  entity_t ent;
75  int frames;
76  float light;
77  vec3_t lightcolor;
78  float start;
79  int baseframe;
80  int frametime; /* in milliseconds */
81 } explosion_t;
82 
84 
85 typedef struct centity_s {
86  entity_state_t current;
87  entity_state_t prev; // will always be valid, but might just be a copy of current
88 
89  vec3_t mins, maxs;
90 
91  int serverframe; // if not current, this ent isn't in the frame
92 
93  int trailcount; // for diminishing grenade trails
94  vec3_t lerp_origin; // for trails (variable hz)
95 
96 #if USE_FPS
97  int prev_frame;
98  int anim_start;
99 
100  int event_frame;
101 #endif
102 
104 
105  int id;
106 } centity_t;
107 
108 extern centity_t cl_entities[MAX_EDICTS];
109 
110 #define MAX_CLIENTWEAPONMODELS 20 // PGM -- upped from 16 to fit the chainfist vwep
111 
112 typedef struct clientinfo_s {
113  char name[MAX_QPATH];
114  qhandle_t skin;
115  qhandle_t icon;
116  char model_name[MAX_QPATH];
117  char skin_name[MAX_QPATH];
118  qhandle_t model;
120 } clientinfo_t;
121 
122 typedef struct {
123  unsigned sent; // time sent, for calculating pings
124  unsigned rcvd; // time rcvd, for calculating pings
125  unsigned cmdNumber; // current cmdNumber for this frame
127 
128 typedef struct {
129  qboolean valid;
130 
131  int number;
132  int delta;
133 
134  byte areabits[MAX_MAP_AREA_BYTES];
136 
137  player_state_t ps;
139 
143 
144 // locally calculated frame flags for debug display
145 #define FF_SERVERDROP (1<<4)
146 #define FF_BADFRAME (1<<5)
147 #define FF_OLDFRAME (1<<6)
148 #define FF_OLDENT (1<<7)
149 #define FF_NODELTA (1<<8)
150 
151 // variable server FPS
152 #if USE_FPS
153 #define CL_FRAMETIME cl.frametime
154 #define CL_1_FRAMETIME cl.frametime_inv
155 #define CL_FRAMEDIV cl.framediv
156 #define CL_FRAMESYNC !(cl.frame.number % cl.framediv)
157 #define CL_KEYPS &cl.keyframe.ps
158 #define CL_OLDKEYPS &cl.oldkeyframe.ps
159 #define CL_KEYLERPFRAC cl.keylerpfrac
160 #else
161 #define CL_FRAMETIME BASE_FRAMETIME
162 #define CL_1_FRAMETIME BASE_1_FRAMETIME
163 #define CL_FRAMEDIV 1
164 #define CL_FRAMESYNC 1
165 #define CL_KEYPS &cl.frame.ps
166 #define CL_OLDKEYPS &cl.oldframe.ps
167 #define CL_KEYLERPFRAC cl.lerpfrac
168 #endif
169 
170 //
171 // the client_state_t structure is wiped completely at every
172 // server map change
173 //
174 typedef struct client_state_s {
176 
180  qboolean sendPacketNow;
181 
182  usercmd_t cmd;
183  usercmd_t cmds[CMD_BACKUP]; // each mesage will send several old cmds
184  unsigned cmdNumber;
185  short predicted_origins[CMD_BACKUP][3]; // for debug comparing against server
188 
189  float predicted_step; // for stair up smoothing
192 
193  vec3_t predicted_origin; // generated by CL_PredictMovement
197 
198  // rebuilt each valid frame
199  centity_t *solidEntities[MAX_PACKET_ENTITIES];
201 
202  entity_state_t baselines[MAX_EDICTS];
203 
204  entity_state_t entityStates[MAX_PARSE_ENTITIES];
206 
207  msgEsFlags_t esFlags;
208 
209  server_frame_t frames[UPDATE_BACKUP];
210  unsigned frameflags;
211 
212  server_frame_t frame; // received from server
216 
217 #if USE_FPS
218  server_frame_t keyframe;
219  server_frame_t oldkeyframe;
220  int keyservertime;
221 #endif
222 
223  byte dcs[CS_BITMAP_BYTES];
224 
225  // the client maintains its own idea of view angles, which are
226  // sent to the server each frame. It is cleared to 0 upon entering each level.
227  // the server sends a delta each frame which is added to the locally
228  // tracked view angles to account for standing on rotating objects,
229  // and teleport direction changes
230  vec3_t viewangles;
231 
232  // interpolated movement vector used for local prediction,
233  // never sent to server, rebuilt each client frame
234  vec3_t localmove;
235 
236  // accumulated mouse forward/side movement, added to both
237  // localmove and pending cmd, cleared each time cmd is finalized
238  vec2_t mousemove;
239 
240 #if USE_SMOOTH_DELTA_ANGLES
241  short delta_angles[3]; // interpolated
242 #endif
243 
244  int time; // this is the time value that the client
245  // is rendering at. always <= cl.servertime
246  float lerpfrac; // between oldframe and frame
247 
248 #if USE_FPS
249  int keytime;
250  float keylerpfrac;
251 #endif
252 
253  refdef_t refdef;
254  float fov_x; // interpolated
255  float fov_y; // derived from fov_x assuming 4/3 aspect ratio
257 
258  vec3_t v_forward, v_right, v_up; // set when refdef.angles is set
259 
260  qboolean thirdPersonView;
261 
262  // predicted values, used for smooth player entity movement in thirdperson view
265 
266  //
267  // transient data from server
268  //
269  char layout[MAX_NET_STRING]; // general 2D overlay
270  int inventory[MAX_ITEMS];
271 
272  //
273  // server state information
274  //
275  int serverstate; // ss_* constants
276  int servercount; // server identification for prespawns
277  char gamedir[MAX_QPATH];
278  int clientNum; // never changed during gameplay, set by serverdata packet
280  pmoveParams_t pmp;
281 
282 #if USE_FPS
283  int frametime; // variable server frame time
284  float frametime_inv; // 1/frametime
285  int framediv; // BASE_FRAMETIME/frametime
286 #endif
287 
288  char baseconfigstrings[MAX_CONFIGSTRINGS][MAX_QPATH];
289  char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH];
290  char mapname[MAX_QPATH]; // short format - q2dm1, etc
291 
292 #if USE_AUTOREPLY
293  unsigned reply_time;
294  unsigned reply_delta;
295 #endif
296 
297  //
298  // locally derived information from server state
299  //
300  bsp_t *bsp;
301 
302  qhandle_t model_draw[MAX_MODELS];
303  mmodel_t *model_clip[MAX_MODELS];
304 
305  qhandle_t sound_precache[MAX_SOUNDS];
306  qhandle_t image_precache[MAX_IMAGES];
307 
308  clientinfo_t clientinfo[MAX_CLIENTS];
310 
314 
315 extern client_state_t cl;
316 
317 /*
318 ==================================================================
319 
320 the client_static_t structure is persistant through an arbitrary number
321 of server connections
322 
323 ==================================================================
324 */
325 
326 // resend delay for challenge/connect packets
327 #define CONNECT_DELAY 3000u
328 
329 #define CONNECT_INSTANT CONNECT_DELAY
330 #define CONNECT_FAST (CONNECT_DELAY - 1000u)
331 
332 typedef enum {
334  ca_disconnected, // not talking to a server
335  ca_challenging, // sending getchallenge packets to the server
336  ca_connecting, // sending connect packets to the server
337  ca_connected, // netchan_t established, waiting for svc_serverdata
338  ca_loading, // loading level data
339  ca_precached, // loaded level data, waiting for svc_frame
340  ca_active, // game views should be displayed
341  ca_cinematic // running a cinematic
342 } connstate_t;
343 
344 #define FOR_EACH_DLQ(q) \
345  LIST_FOR_EACH(dlqueue_t, q, &cls.download.queue, entry)
346 #define FOR_EACH_DLQ_SAFE(q, n) \
347  LIST_FOR_EACH_SAFE(dlqueue_t, q, n, &cls.download.queue, entry)
348 
349 typedef enum {
350  // generic types
354 #if USE_CURL
355  // special types
356  DL_LIST,
357  DL_PAK
358 #endif
359 } dltype_t;
360 
361 typedef enum {
365 } dlstate_t;
366 
367 typedef struct {
368  list_t entry;
371  char path[1];
372 } dlqueue_t;
373 
374 typedef struct client_static_s {
376  keydest_t key_dest;
377 
378  active_t active;
379 
380  qboolean ref_initialized;
381  unsigned disable_screen;
382 
384  cvar_t *userinfo_updates[MAX_PACKET_USERINFOS];
385 // this is set each time a CVAR_USERINFO variable is changed
386 // so that the client knows to send it to the server
387 
389  unsigned realtime; // always increasing, no clamping, etc
390  float frametime; // seconds since last frame
391 
392 // preformance measurement
393 #define C_FPS cls.measure.fps[0]
394 #define R_FPS cls.measure.fps[1]
395 #define C_MPS cls.measure.fps[2]
396 #define C_PPS cls.measure.fps[3]
397 #define C_FRAMES cls.measure.frames[0]
398 #define R_FRAMES cls.measure.frames[1]
399 #define M_FRAMES cls.measure.frames[2]
400 #define P_FRAMES cls.measure.frames[3]
401  struct {
402  unsigned time;
403  int frames[4];
404  int fps[4];
405  int ping;
406  } measure;
407 
408 // connection information
409  netadr_t serverAddress;
410  char servername[MAX_OSPATH]; // name of server from original connect
411  unsigned connect_time; // for connection retransmits
413  qboolean passive;
414 
415 #if USE_ZLIB
416  z_stream z;
417 #endif
418 
419  int quakePort; // a 16 bit value that allows quake servers
420  // to work around address translating routers
421  netchan_t *netchan;
422  int serverProtocol; // in case we are doing some kind of version hack
423  int protocolVersion; // minor version
424 
425  int challenge; // from the server to use for connecting
426 
427 #if USE_ICMP
428  qboolean errorReceived; // got an ICMP error from server
429 #endif
430 
431 #define RECENT_ADDR 4
432 #define RECENT_MASK (RECENT_ADDR - 1)
433 
436 
437  struct {
438  list_t queue; // queue of paths we need
439  int pending; // number of non-finished entries in queue
440  dlqueue_t *current; // path being downloaded
441  int percent; // how much downloaded
442  int position; // how much downloaded (in bytes)
443  qhandle_t file; // UDP file transfer from server
444  char temp[MAX_QPATH + 4];// account 4 bytes for .tmp suffix
445 #if USE_ZLIB
446  z_stream z; // UDP download zlib stream
447 #endif
448  string_entry_t *ignores; // list of ignored paths
449  } download;
450 
451 // demo recording info must be here, so it isn't cleared on level change
452  struct {
453  qhandle_t playback;
454  qhandle_t recording;
455  unsigned time_start;
456  unsigned time_frames;
457  int last_server_frame; // number of server frame the last svc_frame was written
458  int frames_written; // number of frames written to demo file
459  int frames_dropped; // number of svc_frames that didn't fit
460  int others_dropped; // number of misc svc_* messages that didn't fit
461  int frames_read; // number of frames read from demo file
462  int last_snapshot; // number of demo frame the last snapshot was saved
466  sizebuf_t buffer;
467  list_t snapshots;
468  qboolean paused;
469  qboolean seeking;
470  qboolean eof;
471  } demo;
472 
473 #if USE_CLIENT_GTV
474  struct {
476 
477  netstream_t stream;
478  size_t msglen;
479 
480  player_packed_t ps;
481  entity_packed_t entities[MAX_EDICTS];
482 
483  sizebuf_t message;
484  } gtv;
485 #endif
487 
488 extern client_static_t cls;
489 
490 extern cmdbuf_t cl_cmdbuf;
491 extern char cl_cmdbuf_text[MAX_STRING_CHARS];
492 
493 //=============================================================================
494 
495 #define NOPART_GRENADE_EXPLOSION 1
496 #define NOPART_GRENADE_TRAIL 2
497 #define NOPART_ROCKET_EXPLOSION 4
498 #define NOPART_ROCKET_TRAIL 8
499 #define NOPART_BLOOD 16
500 
501 #define NOEXP_GRENADE 1
502 #define NOEXP_ROCKET 2
503 
504 //
505 // cvars
506 //
507 extern cvar_t *cl_gun;
508 extern cvar_t *cl_gunalpha;
509 extern cvar_t *cl_predict;
510 extern cvar_t *cl_footsteps;
511 extern cvar_t *cl_noskins;
512 extern cvar_t *cl_kickangles;
513 extern cvar_t *cl_rollhack;
514 extern cvar_t *cl_noglow;
515 extern cvar_t *cl_nolerp;
516 
517 #ifdef _DEBUG
518 #define SHOWNET(level, ...) \
519  if (cl_shownet->integer > level) \
520  Com_LPrintf(PRINT_DEVELOPER, __VA_ARGS__)
521 #define SHOWCLAMP(level, ...) \
522  if (cl_showclamp->integer > level) \
523  Com_LPrintf(PRINT_DEVELOPER, __VA_ARGS__)
524 #define SHOWMISS(...) \
525  if (cl_showmiss->integer) \
526  Com_LPrintf(PRINT_DEVELOPER, __VA_ARGS__)
527 extern cvar_t *cl_shownet;
528 extern cvar_t *cl_showmiss;
529 extern cvar_t *cl_showclamp;
530 #else
531 #define SHOWNET(...)
532 #define SHOWCLAMP(...)
533 #define SHOWMISS(...)
534 #endif
535 
536 extern cvar_t *cl_vwep;
537 
538 extern cvar_t *cl_disable_particles;
539 extern cvar_t *cl_disable_explosions;
540 extern cvar_t *cl_explosion_sprites;
541 extern cvar_t *cl_explosion_frametime;
542 
543 extern cvar_t *cl_chat_notify;
544 extern cvar_t *cl_chat_sound;
545 extern cvar_t *cl_chat_filter;
546 
547 extern cvar_t *cl_disconnectcmd;
548 extern cvar_t *cl_changemapcmd;
549 extern cvar_t *cl_beginmapcmd;
550 
551 extern cvar_t *cl_gibs;
552 
553 #define CL_PLAYER_MODEL_DISABLED 0
554 #define CL_PLAYER_MODEL_ONLY_GUN 1
555 #define CL_PLAYER_MODEL_FIRST_PERSON 2
556 #define CL_PLAYER_MODEL_THIRD_PERSON 3
557 
558 extern cvar_t *cl_player_model;
559 extern cvar_t *cl_thirdperson_angle;
560 extern cvar_t *cl_thirdperson_range;
561 
562 extern cvar_t *cl_async;
563 
564 //
565 // userinfo
566 //
567 extern cvar_t *info_password;
568 extern cvar_t *info_spectator;
569 extern cvar_t *info_name;
570 extern cvar_t *info_skin;
571 extern cvar_t *info_rate;
572 extern cvar_t *info_fov;
573 extern cvar_t *info_msg;
574 extern cvar_t *info_hand;
575 extern cvar_t *info_gender;
576 extern cvar_t *info_uf;
577 
578 //=============================================================================
579 
580 //
581 // main.c
582 //
583 
584 void CL_Init(void);
585 void CL_Quit_f(void);
586 void CL_Disconnect(error_type_t type);
587 void CL_UpdateRecordingSetting(void);
588 void CL_Begin(void);
589 void CL_CheckForResend(void);
590 void CL_ClearState(void);
591 void CL_RestartFilesystem(qboolean total);
592 void CL_RestartRefresh(qboolean total);
593 void CL_ClientCommand(const char *string);
594 void CL_SendRcon(const netadr_t *adr, const char *pass, const char *cmd);
595 const char *CL_Server_g(const char *partial, int argnum, int state);
596 void CL_CheckForPause(void);
597 void CL_UpdateFrameTimes(void);
598 qboolean CL_CheckForIgnore(const char *s);
599 void CL_WriteConfig(void);
600 
601 
602 //
603 // precache.c
604 //
605 
606 typedef enum {
613 } load_state_t;
614 
615 void CL_ParsePlayerSkin(char *name, char *model, char *skin, const char *s);
616 void CL_LoadClientinfo(clientinfo_t *ci, const char *s);
617 void CL_LoadState(load_state_t state);
618 void CL_RegisterSounds(void);
619 void CL_RegisterBspModels(void);
620 void CL_RegisterVWepModels(void);
621 void CL_PrepRefresh(void);
622 void CL_UpdateConfigstring(int index);
623 
624 
625 //
626 // download.c
627 //
628 qerror_t CL_QueueDownload(const char *path, dltype_t type);
629 qboolean CL_IgnoreDownload(const char *path);
631 void CL_CleanupDownloads(void);
632 void CL_LoadDownloadIgnores(void);
633 void CL_HandleDownload(byte *data, int size, int percent, int compressed);
634 qboolean CL_CheckDownloadExtension(const char *ext);
635 void CL_StartNextDownload(void);
636 void CL_RequestNextDownload(void);
637 void CL_ResetPrecacheCheck(void);
638 void CL_InitDownloads(void);
639 
640 
641 //
642 // input.c
643 //
644 void IN_Init(void);
645 void IN_Shutdown(void);
646 void IN_Frame(void);
647 void IN_Activate(void);
648 
649 void CL_RegisterInput(void);
650 void CL_UpdateCmd(int msec);
651 void CL_FinalizeCmd(void);
652 void CL_SendCmd(void);
653 
654 
655 //
656 // parse.c
657 //
658 
659 typedef struct {
660  int type;
661  vec3_t pos1;
662  vec3_t pos2;
663  vec3_t offset;
664  vec3_t dir;
665  int count;
666  int color;
667  int entity1;
668  int entity2;
669  int time;
670 } tent_params_t;
671 
672 typedef struct {
673  int entity;
674  int weapon;
675  int silenced;
676 } mz_params_t;
677 
678 typedef struct {
679  int flags;
680  int index;
681  int entity;
682  int channel;
683  vec3_t pos;
684  float volume;
685  float attenuation;
686  float timeofs;
687 } snd_params_t;
688 
689 extern tent_params_t te;
690 extern mz_params_t mz;
691 extern snd_params_t snd;
692 
693 void CL_ParseServerMessage(void);
694 void CL_SeekDemoMessage(void);
695 
696 
697 //
698 // entities.c
699 //
700 void CL_DeltaFrame(void);
701 void CL_AddEntities(void);
702 void CL_CalcViewValues(void);
703 
704 #ifdef _DEBUG
705 void CL_CheckEntityPresent(int entnum, const char *what);
706 #endif
707 
708 // the sound code makes callbacks to the client for entitiy position
709 // information, so entities can be dynamically re-spatialized
710 void CL_GetEntitySoundOrigin(int ent, vec3_t org);
711 
712 
713 //
714 // view.c
715 //
716 extern int gun_frame;
717 extern qhandle_t gun_model;
718 
719 void V_Init(void);
720 void V_Shutdown(void);
721 void V_RenderView(void);
722 void V_AddEntity(entity_t *ent);
723 void V_AddParticle(particle_t *p);
724 #if USE_DLIGHTS
725 void V_AddLight(vec3_t org, float intensity, float r, float g, float b);
726 void V_AddLightEx(vec3_t org, float intensity, float r, float g, float b, float radius);
727 #else
728 #define V_AddLight(org, intensity, r, g, b)
729 #define V_AddLightEx(org, intensity, r, g, b, radius)
730 #endif
731 #if USE_LIGHTSTYLES
732 void V_AddLightStyle(int style, vec4_t value);
733 #endif
734 void CL_UpdateBlendSetting(void);
735 
736 
737 //
738 // tent.c
739 //
740 
741 typedef struct cl_sustain_s {
742  int id;
743  int type;
744  int endtime;
747  vec3_t org;
748  vec3_t dir;
749  int color;
750  int count;
752  void (*think)(struct cl_sustain_s *self);
753 } cl_sustain_t;
754 
755 void CL_SmokeAndFlash(vec3_t origin);
756 
757 void CL_RegisterTEntSounds(void);
758 void CL_RegisterTEntModels(void);
759 void CL_ParseTEnt(void);
760 void CL_AddTEnts(void);
761 void CL_ClearTEnts(void);
762 void CL_InitTEnts(void);
763 
764 
765 //
766 // predict.c
767 //
768 void CL_PredictAngles(void);
769 void CL_PredictMovement(void);
770 void CL_CheckPredictionError(void);
771 
772 
773 //
774 // effects.c
775 //
776 #define PARTICLE_GRAVITY 120
777 #define BLASTER_PARTICLE_COLOR 0xe0
778 #define INSTANT_PARTICLE -10000.0
779 
780 typedef struct cparticle_s {
781  struct cparticle_s *next;
782 
783  float time;
784 
785  vec3_t org;
786  vec3_t vel;
787  vec3_t accel;
788  int color; // -1 => use rgba
789  float alpha;
790  float alphavel;
791  color_t rgba;
792  float brightness;
793 } cparticle_t;
794 
795 #if USE_DLIGHTS
796 typedef struct cdlight_s {
797  int key; // so entities can reuse same entry
798  vec3_t color;
799  vec3_t origin;
800  float radius;
801  float die; // stop lighting after this time
802  float decay; // drop this each second
803  vec3_t velosity; // move this far each second
804  //float minlight; // don't add when contributing less
805 } cdlight_t;
806 #endif
807 
808 void CL_BigTeleportParticles(vec3_t org);
809 void CL_RocketTrail(vec3_t start, vec3_t end, centity_t *old);
810 void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags);
811 void CL_FlyEffect(centity_t *ent, vec3_t origin);
812 void CL_BfgParticles(entity_t *ent);
813 void CL_ItemRespawnParticles(vec3_t org);
814 void CL_InitEffects(void);
815 void CL_ClearEffects(void);
816 void CL_BlasterParticles(vec3_t org, vec3_t dir);
817 void CL_ExplosionParticles(vec3_t org);
818 void CL_BFGExplosionParticles(vec3_t org);
819 void CL_BlasterTrail(vec3_t start, vec3_t end);
820 void CL_QuadTrail(vec3_t start, vec3_t end);
821 void CL_OldRailTrail(void);
822 void CL_BubbleTrail(vec3_t start, vec3_t end);
823 void CL_FlagTrail(vec3_t start, vec3_t end, int color);
824 void CL_MuzzleFlash(void);
825 void CL_MuzzleFlash2(void);
826 void CL_TeleporterParticles(vec3_t org);
827 void CL_TeleportParticles(vec3_t org);
828 void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count);
829 void CL_ParticleEffectWaterSplash(vec3_t org, vec3_t dir, int color, int count);
830 void CL_BloodParticleEffect(vec3_t org, vec3_t dir, int color, int count);
831 void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color, int count);
833 void CL_RunParticles(void);
834 void CL_AddParticles(void);
835 #if USE_DLIGHTS
836 cdlight_t *CL_AllocDlight(int key);
837 void CL_RunDLights(void);
838 void CL_AddDLights(void);
839 #endif
840 #if USE_LIGHTSTYLES
841 void CL_ClearLightStyles(void);
842 void CL_SetLightStyle(int index, const char *s);
843 void CL_RunLightStyles(void);
844 void CL_AddLightStyles(void);
845 #endif
846 
847 //
848 // newfx.c
849 //
850 
851 void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color);
852 void CL_BlasterTrail2(vec3_t start, vec3_t end);
853 void CL_DebugTrail(vec3_t start, vec3_t end);
854 void CL_SmokeTrail(vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing);
855 #if USE_DLIGHTS
856 void CL_Flashlight(int ent, vec3_t pos);
857 #endif
858 void CL_ForceWall(vec3_t start, vec3_t end, int color);
859 void CL_GenericParticleEffect(vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel);
860 void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist);
861 void CL_Heatbeam(vec3_t start, vec3_t end);
862 void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude);
863 void CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor);
864 void CL_Tracker_Explode(vec3_t origin);
865 void CL_TagTrail(vec3_t start, vec3_t end, int color);
866 #if USE_DLIGHTS
867 void CL_ColorFlash(vec3_t pos, int ent, int intensity, float r, float g, float b);
868 #endif
869 void CL_Tracker_Shell(vec3_t origin);
870 void CL_MonsterPlasma_Shell(vec3_t origin);
871 void CL_ColorExplosionParticles(vec3_t org, int color, int run);
872 void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude);
873 void CL_Widowbeamout(cl_sustain_t *self);
874 void CL_Nukeblast(cl_sustain_t *self);
875 void CL_WidowSplash(void);
876 void CL_IonripperTrail(vec3_t start, vec3_t end);
877 void CL_TrapParticles(entity_t *ent);
878 void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color, int count);
880 
881 
882 //
883 // demo.c
884 //
885 void CL_InitDemos(void);
886 void CL_CleanupDemos(void);
887 void CL_DemoFrame(int msec);
888 qboolean CL_WriteDemoMessage(sizebuf_t *buf);
889 void CL_EmitDemoFrame(void);
890 void CL_EmitDemoSnapshot(void);
891 void CL_FirstDemoFrame(void);
892 void CL_Stop_f(void);
893 demoInfo_t *CL_GetDemoInfo(const char *path, demoInfo_t *info);
894 
895 
896 //
897 // locs.c
898 //
899 void LOC_Init(void);
900 void LOC_LoadLocations(void);
901 void LOC_FreeLocations(void);
902 void LOC_UpdateCvars(void);
903 void LOC_AddLocationsToScene(void);
904 
905 
906 //
907 // console.c
908 //
909 void Con_Init(void);
910 void Con_PostInit(void);
911 void Con_Shutdown(void);
912 void Con_DrawConsole(void);
913 void Con_RunConsole(void);
914 void Con_Print(const char *txt);
915 void Con_ClearNotify_f(void);
916 void Con_ToggleConsole_f(void);
917 void Con_ClearTyping(void);
918 void Con_Close(qboolean force);
919 void Con_Popup(qboolean force);
920 void Con_SkipNotify(qboolean skip);
921 void Con_RegisterMedia(void);
922 void Con_CheckResize(void);
923 
924 void Key_Console(int key);
925 void Key_Message(int key);
926 void Char_Console(int key);
927 void Char_Message(int key);
928 
929 
930 //
931 // refresh.c
932 //
933 void CL_InitRefresh(void);
934 void CL_ShutdownRefresh(void);
935 void CL_RunRefresh(void);
936 
937 
938 //
939 // screen.c
940 //
941 extern vrect_t scr_vrect; // position of render window
942 
943 void SCR_Init(void);
944 void SCR_Shutdown(void);
945 void SCR_UpdateScreen(void);
946 void SCR_SizeUp(void);
947 void SCR_SizeDown(void);
948 void SCR_CenterPrint(const char *str);
949 void SCR_FinishCinematic(void);
950 void SCR_PlayCinematic(const char *name);
951 void SCR_RunCinematic();
952 void SCR_BeginLoadingPlaque(void);
953 void SCR_EndLoadingPlaque(void);
954 void SCR_DebugGraph(float value, int color);
955 void SCR_TouchPics(void);
956 void SCR_RegisterMedia(void);
957 void SCR_ModeChanged(void);
958 void SCR_LagSample(void);
959 void SCR_LagClear(void);
960 void SCR_SetCrosshairColor(void);
961 qhandle_t SCR_GetFont(void);
962 void SCR_SetHudAlpha(float alpha);
963 
964 float SCR_FadeAlpha(unsigned startTime, unsigned visTime, unsigned fadeTime);
965 int SCR_DrawStringEx(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font);
966 void SCR_DrawStringMulti(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font);
967 
968 void SCR_ClearChatHUD_f(void);
969 void SCR_AddToChatHUD(const char *text);
970 
971 #ifdef _DEBUG
972 void CL_AddNetgraph(void);
973 #endif
974 
975 
976 //
977 // ascii.c
978 //
979 void CL_InitAscii(void);
980 
981 
982 //
983 // http.c
984 //
985 #if USE_CURL
986 void HTTP_Init(void);
987 void HTTP_Shutdown(void);
988 void HTTP_SetServer(const char *url);
989 qerror_t HTTP_QueueDownload(const char *path, dltype_t type);
990 void HTTP_RunDownloads(void);
991 void HTTP_CleanupDownloads(void);
992 #else
993 #define HTTP_Init() (void)0
994 #define HTTP_Shutdown() (void)0
995 #define HTTP_SetServer(url) (void)0
996 #define HTTP_QueueDownload(path, type) Q_ERR_NOSYS
997 #define HTTP_RunDownloads() (void)0
998 #define HTTP_CleanupDownloads() (void)0
999 #endif
1000 
1001 //
1002 // gtv.c
1003 //
1004 
1005 #if USE_CLIENT_GTV
1006 void CL_GTV_EmitFrame(void);
1007 void CL_GTV_WriteMessage(byte *data, size_t len);
1008 void CL_GTV_Resume(void);
1009 void CL_GTV_Suspend(void);
1010 void CL_GTV_Transmit(void);
1011 void CL_GTV_Run(void);
1012 void CL_GTV_Init(void);
1013 void CL_GTV_Shutdown(void);
1014 #else
1015 #define CL_GTV_EmitFrame() (void)0
1016 #define CL_GTV_WriteMessage(data, len) (void)0
1017 #define CL_GTV_Resume() (void)0
1018 #define CL_GTV_Suspend() (void)0
1019 #define CL_GTV_Transmit() (void)0
1020 #define CL_GTV_Run() (void)0
1021 #define CL_GTV_Init() (void)0
1022 #define CL_GTV_Shutdown() (void)0
1023 #endif
1024 
1025 //
1026 // crc.c
1027 //
1028 byte COM_BlockSequenceCRCByte(byte *base, size_t length, int sequence);
1029 
1030 //
1031 // effects.c
1032 //
1033 void FX_Init(void);
1034 
1035 // RTX development feature that loads and spawns a set of material sample balls
1036 #define CL_RTX_SHADERBALLS 1
SCR_FadeAlpha
float SCR_FadeAlpha(unsigned startTime, unsigned visTime, unsigned fadeTime)
Definition: screen.c:193
client_state_s::frame
server_frame_t frame
Definition: client.h:212
server_frame_t::valid
qboolean valid
Definition: client.h:129
CL_Tracker_Shell
void CL_Tracker_Shell(vec3_t origin)
Definition: newfx.c:466
client_state_s::mousemove
vec2_t mousemove
Definition: client.h:238
tent_params_t::time
int time
Definition: client.h:669
LOC_FreeLocations
void LOC_FreeLocations(void)
Definition: locs.c:122
client_state_s::bsp
bsp_t * bsp
Definition: client.h:300
CL_SmokeTrail
void CL_SmokeTrail(vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing)
Definition: newfx.c:105
client_static_s::connect_time
unsigned connect_time
Definition: client.h:411
CL_GenericParticleEffect
void CL_GenericParticleEffect(vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel)
Definition: newfx.c:191
client_state_s::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:289
client_state_s::inventory
int inventory[MAX_ITEMS]
Definition: client.h:270
tent_params_t::offset
vec3_t offset
Definition: client.h:663
snd_params_t::flags
int flags
Definition: client.h:679
tent_params_t::pos1
vec3_t pos1
Definition: client.h:661
cl_disconnectcmd
cvar_t * cl_disconnectcmd
Definition: main.c:59
CL_ParticleEffect
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count)
Definition: effects.c:877
CL_IonripperTrail
void CL_IonripperTrail(vec3_t start, vec3_t end)
Definition: newfx.c:843
CL_FlagTrail
void CL_FlagTrail(vec3_t start, vec3_t end, int color)
Definition: effects.c:1436
CL_SendCmd
void CL_SendCmd(void)
Definition: input.c:1166
client_static_s::passive
qboolean passive
Definition: client.h:413
cl_chat_filter
cvar_t * cl_chat_filter
Definition: main.c:55
CL_MuzzleFlash2
void CL_MuzzleFlash2(void)
Definition: effects.c:459
CL_UpdateRecordingSetting
void CL_UpdateRecordingSetting(void)
Definition: main.c:265
FX_Init
void FX_Init(void)
Definition: effects.c:838
client_state_s::entityStates
entity_state_t entityStates[MAX_PARSE_ENTITIES]
Definition: client.h:204
client_static_s::quakePort
int quakePort
Definition: client.h:419
client_state_s::servertime
int servertime
Definition: client.h:214
client_state_s::image_precache
qhandle_t image_precache[MAX_IMAGES]
Definition: client.h:306
LOAD_SOUNDS
@ LOAD_SOUNDS
Definition: client.h:612
cl_disable_explosions
cvar_t * cl_disable_explosions
Definition: main.c:52
cl_sustain_s
Definition: client.h:741
MAX_EXPLOSIONS
#define MAX_EXPLOSIONS
Definition: client.h:58
client_static_s::playback
qhandle_t playback
Definition: client.h:453
snd
snd_params_t snd
Definition: parse.c:657
cl_sustain_s::count
int count
Definition: client.h:750
dlqueue_t
Definition: client.h:367
CL_Widowbeamout
void CL_Widowbeamout(cl_sustain_t *self)
Definition: newfx.c:520
RECENT_ADDR
#define RECENT_ADDR
Definition: client.h:431
client_static_s::last_server_frame
int last_server_frame
Definition: client.h:457
client_state_s::cmdNumber
unsigned cmdNumber
Definition: client.h:184
centity_s::prev
entity_state_t prev
Definition: client.h:87
CL_GTV_WriteMessage
#define CL_GTV_WriteMessage(data, len)
Definition: client.h:1016
CL_Server_g
const char * CL_Server_g(const char *partial, int argnum, int state)
DL_OTHER
@ DL_OTHER
Definition: client.h:351
client_static_s::demo
struct client_static_s::@3 demo
CL_CheckDownloadExtension
qboolean CL_CheckDownloadExtension(const char *ext)
Definition: download.c:494
info_password
cvar_t * info_password
Definition: main.c:79
client_state_s::solidEntities
centity_t * solidEntities[MAX_PACKET_ENTITIES]
Definition: client.h:199
CL_GetDemoInfo
demoInfo_t * CL_GetDemoInfo(const char *path, demoInfo_t *info)
Definition: demo.c:1091
client_static_s::file
qhandle_t file
Definition: client.h:443
cl_kickangles
cvar_t * cl_kickangles
Definition: main.c:36
snd_params_t::entity
int entity
Definition: client.h:681
dlqueue_t::entry
list_t entry
Definition: client.h:368
cl_async
cvar_t * cl_async
Definition: main.c:32
client_state_s::model_clip
mmodel_t * model_clip[MAX_MODELS]
Definition: client.h:303
client_static_s
Definition: client.h:374
CL_GTV_Init
#define CL_GTV_Init()
Definition: client.h:1021
SCR_Shutdown
void SCR_Shutdown(void)
Definition: screen.c:1413
centity_s::mins
vec3_t mins
Definition: client.h:89
client_static_s::buffer
sizebuf_t buffer
Definition: client.h:466
CL_BlasterTrail2
void CL_BlasterTrail2(vec3_t start, vec3_t end)
Definition: newfx.c:798
CL_IgnoreDownload
qboolean CL_IgnoreDownload(const char *path)
Definition: download.c:95
cparticle_s
Definition: client.h:780
CL_RegisterVWepModels
void CL_RegisterVWepModels(void)
Definition: precache.c:269
CL_RegisterInput
void CL_RegisterInput(void)
Definition: input.c:707
Key_Console
void Key_Console(int key)
Definition: console.c:1137
client_state_s::v_forward
vec3_t v_forward
Definition: client.h:258
CL_InitTEnts
void CL_InitTEnts(void)
Definition: tent.c:1467
info_gender
cvar_t * info_gender
Definition: main.c:87
tent_params_t
Definition: client.h:659
Con_SkipNotify
void Con_SkipNotify(qboolean skip)
Definition: console.c:99
client_state_s::numWeaponModels
int numWeaponModels
Definition: client.h:312
tent_params_t::entity1
int entity1
Definition: client.h:667
cparticle_s::brightness
float brightness
Definition: client.h:792
CL_Stop_f
void CL_Stop_f(void)
Definition: demo.c:268
tent_params_t::dir
vec3_t dir
Definition: client.h:664
CL_CheckPredictionError
void CL_CheckPredictionError(void)
Definition: predict.c:27
client_static_s::key_dest
keydest_t key_dest
Definition: client.h:376
IN_Activate
void IN_Activate(void)
Definition: input.c:117
cl_cmdbuf
cmdbuf_t cl_cmdbuf
Definition: main.c:104
CL_GTV_Transmit
#define CL_GTV_Transmit()
Definition: client.h:1019
client_static_s::last_snapshot
int last_snapshot
Definition: client.h:462
CL_GTV_Resume
#define CL_GTV_Resume()
Definition: client.h:1017
client_state_s::prediction_error
vec3_t prediction_error
Definition: client.h:196
CL_ClearTEnts
void CL_ClearTEnts(void)
Definition: tent.c:1459
cl_sustain_s::thinkinterval
int thinkinterval
Definition: client.h:746
SCR_SetCrosshairColor
void SCR_SetCrosshairColor(void)
Definition: screen.c:1242
client_static_s::file_percent
int file_percent
Definition: client.h:465
Con_RunConsole
void Con_RunConsole(void)
Definition: console.c:982
client_state_s::serverstate
int serverstate
Definition: client.h:275
centity_s::id
int id
Definition: client.h:105
DL_MAP
@ DL_MAP
Definition: client.h:352
dltype_t
dltype_t
Definition: client.h:349
SCR_UpdateScreen
void SCR_UpdateScreen(void)
Definition: screen.c:2142
info_name
cvar_t * info_name
Definition: main.c:81
HTTP_SetServer
#define HTTP_SetServer(url)
Definition: client.h:995
cparticle_s::vel
vec3_t vel
Definition: client.h:786
cparticle_s::accel
vec3_t accel
Definition: client.h:787
cl_beginmapcmd
cvar_t * cl_beginmapcmd
Definition: main.c:61
ca_disconnected
@ ca_disconnected
Definition: client.h:334
CL_GetEntitySoundOrigin
void CL_GetEntitySoundOrigin(int ent, vec3_t org)
Definition: entities.c:1404
client_state_s::predicted_velocity
vec3_t predicted_velocity
Definition: client.h:195
ca_active
@ ca_active
Definition: client.h:340
client_static_s::time_start
unsigned time_start
Definition: client.h:455
LOAD_IMAGES
@ LOAD_IMAGES
Definition: client.h:610
snd_params_t::volume
float volume
Definition: client.h:684
client_state_s::thirdPersonView
qboolean thirdPersonView
Definition: client.h:260
CL_SmokeAndFlash
void CL_SmokeAndFlash(vec3_t origin)
Definition: tent.c:207
client_static_s::state
connstate_t state
Definition: client.h:375
CL_InitRefresh
void CL_InitRefresh(void)
Definition: refresh.c:289
explosion_t::baseframe
int baseframe
Definition: client.h:79
client_state_s::gamedir
char gamedir[MAX_QPATH]
Definition: client.h:277
CL_RegisterTEntModels
void CL_RegisterTEntModels(void)
Definition: tent.c:100
ca_connected
@ ca_connected
Definition: client.h:337
client_state_s::lerpfrac
float lerpfrac
Definition: client.h:246
client_static_s::ref_initialized
qboolean ref_initialized
Definition: client.h:380
CL_TagTrail
void CL_TagTrail(vec3_t start, vec3_t end, int color)
Definition: newfx.c:646
cl_disable_particles
cvar_t * cl_disable_particles
Definition: main.c:51
cl_predict
cvar_t * cl_predict
Definition: main.c:28
CL_TeleporterParticles
void CL_TeleporterParticles(vec3_t org)
Definition: effects.c:1098
CL_Begin
void CL_Begin(void)
Definition: main.c:1757
client_static_s::active
active_t active
Definition: client.h:378
HTTP_CleanupDownloads
#define HTTP_CleanupDownloads()
Definition: client.h:998
CL_Nukeblast
void CL_Nukeblast(cl_sustain_t *self)
Definition: newfx.c:551
client_state_s::v_up
vec3_t v_up
Definition: client.h:258
CL_HandleDownload
void CL_HandleDownload(byte *data, int size, int percent, int compressed)
Definition: download.c:424
CL_RocketTrail
void CL_RocketTrail(vec3_t start, vec3_t end, centity_t *old)
Definition: effects.c:1579
client_state_s::dcs
byte dcs[CS_BITMAP_BYTES]
Definition: client.h:223
IN_Init
void IN_Init(void)
Definition: input.c:210
client_state_s::viewangles
vec3_t viewangles
Definition: client.h:230
client_static_s::frames
int frames[4]
Definition: client.h:403
cl_sustain_s::nextthink
int nextthink
Definition: client.h:745
CL_WriteConfig
void CL_WriteConfig(void)
Definition: main.c:2391
CL_UpdateBlendSetting
void CL_UpdateBlendSetting(void)
Definition: view.c:292
explosion_t::ex_misc
@ ex_misc
Definition: client.h:64
client_state_s::oldframe
server_frame_t oldframe
Definition: client.h:213
LOC_AddLocationsToScene
void LOC_AddLocationsToScene(void)
Definition: locs.c:177
CL_TrapParticles
void CL_TrapParticles(entity_t *ent)
Definition: newfx.c:897
CL_MuzzleFlash
void CL_MuzzleFlash(void)
Definition: effects.c:257
client_static_s::connect_count
int connect_count
Definition: client.h:412
CL_RegisterTEntSounds
void CL_RegisterTEntSounds(void)
Definition: tent.c:64
CL_EmitDemoSnapshot
void CL_EmitDemoSnapshot(void)
Definition: demo.c:773
snd_params_t::attenuation
float attenuation
Definition: client.h:685
connstate_t
connstate_t
Definition: client.h:332
client_static_s::time
unsigned time
Definition: client.h:402
client_state_s::serverdelta
int serverdelta
Definition: client.h:215
dlstate_t
dlstate_t
Definition: client.h:361
SCR_EndLoadingPlaque
void SCR_EndLoadingPlaque(void)
Definition: screen.c:1456
client_static_t
struct client_static_s client_static_t
CL_ClearState
void CL_ClearState(void)
Definition: main.c:699
CL_SeekDemoMessage
void CL_SeekDemoMessage(void)
Definition: parse.c:1343
CL_UpdateCmd
void CL_UpdateCmd(int msec)
Definition: input.c:655
CL_EmitDemoFrame
void CL_EmitDemoFrame(void)
Definition: demo.c:186
ext
char ext[4]
Definition: images.c:657
explosion_t
Definition: client.h:60
CL_LoadDownloadIgnores
void CL_LoadDownloadIgnores(void)
Definition: download.c:173
client_state_s::weaponModels
char weaponModels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: client.h:311
CL_OldRailTrail
void CL_OldRailTrail(void)
Definition: effects.c:1632
LOAD_NONE
@ LOAD_NONE
Definition: client.h:607
client_static_s::frames_written
int frames_written
Definition: client.h:458
explosion_t::lightcolor
vec3_t lightcolor
Definition: client.h:77
client_static_s::ignores
string_entry_t * ignores
Definition: client.h:448
explosion_t::ex_mflash
@ ex_mflash
Definition: client.h:66
LOC_Init
void LOC_Init(void)
Definition: locs.c:376
client_state_s::sound_precache
qhandle_t sound_precache[MAX_SOUNDS]
Definition: client.h:305
V_AddEntity
void V_AddEntity(entity_t *ent)
Definition: view.c:91
client_state_s::baseconfigstrings
char baseconfigstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:288
V_Shutdown
void V_Shutdown(void)
Definition: view.c:560
SCR_DebugGraph
void SCR_DebugGraph(float value, int color)
gun_frame
int gun_frame
Definition: view.c:27
CL_GTV_Suspend
#define CL_GTV_Suspend()
Definition: client.h:1018
cl_sustain_t
struct cl_sustain_s cl_sustain_t
tent_params_t::entity2
int entity2
Definition: client.h:668
cl_explosion_frametime
cvar_t * cl_explosion_frametime
Definition: main.c:57
cparticle_s::next
struct cparticle_s * next
Definition: client.h:781
CL_Disconnect
void CL_Disconnect(error_type_t type)
Definition: main.c:740
Con_ToggleConsole_f
void Con_ToggleConsole_f(void)
Definition: console.c:194
V_RenderView
void V_RenderView(void)
Definition: view.c:402
CL_InitDownloads
void CL_InitDownloads(void)
Definition: download.c:937
CL_ParticleSmokeEffect
void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: newfx.c:721
mz_params_t
Definition: client.h:672
client_static_s::fps
int fps[4]
Definition: client.h:404
CL_FinishDownload
void CL_FinishDownload(dlqueue_t *q)
Definition: download.c:115
client_state_s::predicted_step
float predicted_step
Definition: client.h:189
explosion_t::ex_free
@ ex_free
Definition: client.h:62
server_frame_t::areabytes
int areabytes
Definition: client.h:135
explosion_t::ex_poly
@ ex_poly
Definition: client.h:67
CL_Quit_f
void CL_Quit_f(void)
client_static_s::recording
qhandle_t recording
Definition: client.h:454
cl_sustain_s::org
vec3_t org
Definition: client.h:747
HTTP_Init
#define HTTP_Init()
Definition: client.h:993
client_state_s::servercount
int servercount
Definition: client.h:276
CL_BlasterParticles
void CL_BlasterParticles(vec3_t org, vec3_t dir)
Definition: effects.c:1300
cl_noskins
cvar_t * cl_noskins
Definition: main.c:25
info_hand
cvar_t * info_hand
Definition: main.c:86
SCR_GetFont
qhandle_t SCR_GetFont(void)
Definition: screen.c:2196
CL_RegisterBspModels
void CL_RegisterBspModels(void)
Definition: precache.c:226
cl_sustain_s::dir
vec3_t dir
Definition: client.h:748
cparticle_s::alphavel
float alphavel
Definition: client.h:790
client_static_s::userinfo_updates
cvar_t * userinfo_updates[MAX_PACKET_USERINFOS]
Definition: client.h:384
info_rate
cvar_t * info_rate
Definition: main.c:83
cl_sustain_s::id
int id
Definition: client.h:742
clientinfo_s::name
char name[MAX_QPATH]
Definition: client.h:113
client_state_s::sendPacketNow
qboolean sendPacketNow
Definition: client.h:180
cl_nolerp
cvar_t * cl_nolerp
Definition: main.c:39
cparticle_s::rgba
color_t rgba
Definition: client.h:791
Con_Init
void Con_Init(void)
Definition: console.c:436
client_static_s::challenge
int challenge
Definition: client.h:425
CL_FirstDemoFrame
void CL_FirstDemoFrame(void)
Definition: demo.c:876
clientinfo_s::model
qhandle_t model
Definition: client.h:118
ca_precached
@ ca_precached
Definition: client.h:339
client_state_s::refdef
refdef_t refdef
Definition: client.h:253
Con_ClearTyping
void Con_ClearTyping(void)
Definition: console.c:109
client_static_s::seeking
qboolean seeking
Definition: client.h:469
client_state_s::frameflags
unsigned frameflags
Definition: client.h:210
CL_GTV_EmitFrame
#define CL_GTV_EmitFrame()
Definition: client.h:1015
client_state_s::clientNum
int clientNum
Definition: client.h:278
CL_Tracker_Explode
void CL_Tracker_Explode(vec3_t origin)
Definition: newfx.c:611
client_state_s::playerEntityOrigin
vec3_t playerEntityOrigin
Definition: client.h:263
centity_s::current
entity_state_t current
Definition: client.h:86
CL_ForceWall
void CL_ForceWall(vec3_t start, vec3_t end, int color)
Definition: newfx.c:143
CL_ParsePlayerSkin
void CL_ParsePlayerSkin(char *name, char *model, char *skin, const char *s)
Definition: precache.c:35
CL_DebugTrail
void CL_DebugTrail(vec3_t start, vec3_t end)
Definition: newfx.c:63
client_static_s::current
dlqueue_t * current
Definition: client.h:440
CL_ExplosionParticles
void CL_ExplosionParticles(vec3_t org)
Definition: effects.c:1221
DL_MODEL
@ DL_MODEL
Definition: client.h:353
client_state_s::localmove
vec3_t localmove
Definition: client.h:234
client_state_s::predicted_origin
vec3_t predicted_origin
Definition: client.h:193
explosion_t::ex_poly2
@ ex_poly2
Definition: client.h:68
CL_ShutdownRefresh
void CL_ShutdownRefresh(void)
Definition: refresh.c:375
client_static_s::others_dropped
int others_dropped
Definition: client.h:460
explosion_t::start
float start
Definition: client.h:78
CL_BfgParticles
void CL_BfgParticles(entity_t *ent)
Definition: effects.c:1847
cl_thirdperson_angle
cvar_t * cl_thirdperson_angle
Definition: main.c:48
cl_player_model
cvar_t * cl_player_model
Definition: main.c:47
CL_WidowSplash
void CL_WidowSplash(void)
Definition: newfx.c:582
clientinfo_s::icon
qhandle_t icon
Definition: client.h:115
SCR_RegisterMedia
void SCR_RegisterMedia(void)
Definition: screen.c:1297
CL_ParticleEffect2
void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color, int count)
Definition: effects.c:1060
client_state_s::baselines
entity_state_t baselines[MAX_EDICTS]
Definition: client.h:202
SCR_PlayCinematic
void SCR_PlayCinematic(const char *name)
Definition: cin.c:477
client_static_s::frames_read
int frames_read
Definition: client.h:461
explosion_t::ex_blaster
@ ex_blaster
Definition: client.h:70
client_static_s::userinfo_modified
int userinfo_modified
Definition: client.h:383
CL_DemoFrame
void CL_DemoFrame(int msec)
Definition: demo.c:1223
client_state_s::predicted_step_frame
unsigned predicted_step_frame
Definition: client.h:191
SCR_RunCinematic
void SCR_RunCinematic()
Definition: cin.c:429
SCR_LagSample
void SCR_LagSample(void)
Definition: screen.c:537
client_state_s::model_draw
qhandle_t model_draw[MAX_MODELS]
Definition: client.h:302
CL_ClearEffects
void CL_ClearEffects(void)
Definition: effects.c:2067
HTTP_RunDownloads
#define HTTP_RunDownloads()
Definition: client.h:997
DL_DONE
@ DL_DONE
Definition: client.h:364
clientinfo_s::weaponmodel
qhandle_t weaponmodel[MAX_CLIENTWEAPONMODELS]
Definition: client.h:119
Con_Print
void Con_Print(const char *txt)
Definition: console.c:557
client_static_s::serverProtocol
int serverProtocol
Definition: client.h:422
client_state_s::layout
char layout[MAX_NET_STRING]
Definition: client.h:269
cl_explosions
explosion_t cl_explosions[MAX_EXPLOSIONS]
Definition: tent.c:136
CL_GTV_Run
#define CL_GTV_Run()
Definition: client.h:1020
SCR_LagClear
void SCR_LagClear(void)
Definition: screen.c:532
clientinfo_s::model_name
char model_name[MAX_QPATH]
Definition: client.h:116
cparticle_s::org
vec3_t org
Definition: client.h:785
dlqueue_t::state
dlstate_t state
Definition: client.h:370
info_uf
cvar_t * info_uf
Definition: main.c:88
cl_gunalpha
cvar_t * cl_gunalpha
Definition: main.c:30
origin
static vec3_t origin
Definition: mesh.c:27
client_state_s::baseclientinfo
clientinfo_t baseclientinfo
Definition: client.h:309
cl_sustain_s::magnitude
int magnitude
Definition: client.h:751
CL_AddTEnts
void CL_AddTEnts(void)
Definition: tent.c:1445
client_state_s::cmds
usercmd_t cmds[CMD_BACKUP]
Definition: client.h:183
info_fov
cvar_t * info_fov
Definition: main.c:84
client_state_s::time
int time
Definition: client.h:244
client_history_t::sent
unsigned sent
Definition: client.h:123
CL_ParseTEnt
void CL_ParseTEnt(void)
Definition: tent.c:1069
client_state_s::esFlags
msgEsFlags_t esFlags
Definition: client.h:207
CL_AddParticles
void CL_AddParticles(void)
Definition: effects.c:1989
CL_RunParticles
void CL_RunParticles(void)
SCR_FinishCinematic
void SCR_FinishCinematic(void)
Definition: cin.c:105
client_static_s::pending
int pending
Definition: client.h:439
CL_InitDemos
void CL_InitDemos(void)
Definition: demo.c:1273
CL_MonsterPlasma_Shell
void CL_MonsterPlasma_Shell(vec3_t origin)
Definition: newfx.c:493
CL_CheckForPause
void CL_CheckForPause(void)
Definition: main.c:3056
explosion_t::ent
entity_t ent
Definition: client.h:74
CL_PredictMovement
void CL_PredictMovement(void)
Definition: predict.c:175
void
void(APIENTRY *qwglDrawBuffer)(GLenum mode)
client_static_s::servername
char servername[MAX_OSPATH]
Definition: client.h:410
CL_BlasterTrail
void CL_BlasterTrail(vec3_t start, vec3_t end)
Definition: effects.c:1339
explosion_t::ex_flash
@ ex_flash
Definition: client.h:65
client_static_s::percent
int percent
Definition: client.h:441
cl_sustain_s::endtime
int endtime
Definition: client.h:744
Con_Close
void Con_Close(qboolean force)
Definition: console.c:124
client_state_s::lightlevel
int lightlevel
Definition: client.h:256
cl_gun
cvar_t * cl_gun
Definition: main.c:29
CL_StartNextDownload
void CL_StartNextDownload(void)
Definition: download.c:294
client_state_s::lastTransmitCmdNumber
unsigned lastTransmitCmdNumber
Definition: client.h:178
V_AddLight
#define V_AddLight(org, intensity, r, g, b)
Definition: client.h:728
cl_chat_notify
cvar_t * cl_chat_notify
Definition: main.c:53
Key_Message
void Key_Message(int key)
Definition: console.c:1241
server_frame_t
Definition: client.h:128
client_state_s::clientinfo
clientinfo_t clientinfo[MAX_CLIENTS]
Definition: client.h:308
snd_params_t::index
int index
Definition: client.h:680
SCR_TouchPics
void SCR_TouchPics(void)
CL_BlasterParticles2
void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color)
Definition: newfx.c:761
client_state_s::mapname
char mapname[MAX_QPATH]
Definition: client.h:290
Char_Console
void Char_Console(int key)
Definition: console.c:1229
SCR_CenterPrint
void SCR_CenterPrint(const char *str)
Definition: screen.c:462
CL_Init
void CL_Init(void)
Definition: main.c:3414
info_spectator
cvar_t * info_spectator
Definition: main.c:80
centity_s
Definition: client.h:85
client_state_t
struct client_state_s client_state_t
client_history_t::cmdNumber
unsigned cmdNumber
Definition: client.h:125
CL_UpdateConfigstring
void CL_UpdateConfigstring(int index)
Definition: precache.c:417
CL_BloodParticleEffect
void CL_BloodParticleEffect(vec3_t org, vec3_t dir, int color, int count)
Definition: effects.c:1006
snd_params_t
Definition: client.h:678
cl
client_state_t cl
Definition: main.c:99
SCR_SetHudAlpha
void SCR_SetHudAlpha(float alpha)
Definition: screen.c:2201
server_frame_t::clientNum
int clientNum
Definition: client.h:138
server_frame_t::delta
int delta
Definition: client.h:132
CL_AddEntities
void CL_AddEntities(void)
Definition: entities.c:1378
client_static_s::frametime
float frametime
Definition: client.h:390
client_state_s::predicted_step_time
unsigned predicted_step_time
Definition: client.h:190
Con_PostInit
void Con_PostInit(void)
Definition: console.c:479
SCR_DrawStringMulti
void SCR_DrawStringMulti(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font)
Definition: screen.c:163
cl_vwep
cvar_t * cl_vwep
Definition: main.c:72
cls
client_static_t cls
Definition: main.c:98
ca_uninitialized
@ ca_uninitialized
Definition: client.h:333
client_state_s::frames
server_frame_t frames[UPDATE_BACKUP]
Definition: client.h:209
ca_cinematic
@ ca_cinematic
Definition: client.h:341
clientinfo_t
struct clientinfo_s clientinfo_t
DL_RUNNING
@ DL_RUNNING
Definition: client.h:363
cparticle_s::color
int color
Definition: client.h:788
CL_ParticleSteamEffect2
void CL_ParticleSteamEffect2(cl_sustain_t *self)
Definition: newfx.c:375
cl_cmdbuf_text
char cl_cmdbuf_text[MAX_STRING_CHARS]
Definition: main.c:105
IN_Frame
void IN_Frame(void)
Definition: input.c:140
client_state_s
Definition: client.h:174
client_static_s::queue
list_t queue
Definition: client.h:438
client_state_s::timeoutcount
int timeoutcount
Definition: client.h:175
CL_PrepRefresh
void CL_PrepRefresh(void)
Definition: precache.c:333
CL_RestartFilesystem
void CL_RestartFilesystem(qboolean total)
Definition: main.c:2418
CL_RequestNextDownload
void CL_RequestNextDownload(void)
Definition: download.c:735
client_state_s::numEntityStates
int numEntityStates
Definition: client.h:205
CL_Heatbeam
void CL_Heatbeam(vec3_t start, vec3_t end)
Definition: newfx.c:266
SCR_ModeChanged
void SCR_ModeChanged(void)
Definition: screen.c:1278
client_static_s::eof
qboolean eof
Definition: client.h:470
V_AddLightEx
#define V_AddLightEx(org, intensity, r, g, b, radius)
Definition: client.h:729
CL_WriteDemoMessage
qboolean CL_WriteDemoMessage(sizebuf_t *buf)
Definition: demo.c:41
V_AddParticle
void V_AddParticle(particle_t *p)
Definition: view.c:106
client_state_s::cmd
usercmd_t cmd
Definition: client.h:182
centity_t
struct centity_s centity_t
client_static_s::recent_addr
netadr_t recent_addr[RECENT_ADDR]
Definition: client.h:434
client_state_s::predicted_origins
short predicted_origins[CMD_BACKUP][3]
Definition: client.h:185
client_state_s::v_right
vec3_t v_right
Definition: client.h:258
V_Init
void V_Init(void)
Definition: view.c:533
server_frame_t::numEntities
int numEntities
Definition: client.h:140
mz
mz_params_t mz
Definition: parse.c:656
snd_params_t::pos
vec3_t pos
Definition: client.h:683
MAX_CLIENTWEAPONMODELS
#define MAX_CLIENTWEAPONMODELS
Definition: client.h:110
cl_gibs
cvar_t * cl_gibs
Definition: main.c:63
client_state_s::initialSeq
int initialSeq
Definition: client.h:187
client_state_s::fov_x
float fov_x
Definition: client.h:254
ca_challenging
@ ca_challenging
Definition: client.h:335
cl_noglow
cvar_t * cl_noglow
Definition: main.c:38
SCR_Init
void SCR_Init(void)
Definition: screen.c:1348
CL_SendRcon
void CL_SendRcon(const netadr_t *adr, const char *pass, const char *cmd)
Definition: main.c:637
mz_params_t::silenced
int silenced
Definition: client.h:675
client_history_t::rcvd
unsigned rcvd
Definition: client.h:124
client_static_s::download
struct client_static_s::@2 download
client_static_s::ping
int ping
Definition: client.h:405
CL_TeleportParticles
void CL_TeleportParticles(vec3_t org)
Definition: effects.c:1942
server_frame_t::ps
player_state_t ps
Definition: client.h:137
LOC_UpdateCvars
void LOC_UpdateCvars(void)
centity_s::trailcount
int trailcount
Definition: client.h:93
CL_CalcViewValues
void CL_CalcViewValues(void)
Definition: entities.c:1251
te
tent_params_t te
Definition: parse.c:655
snd_params_t::timeofs
float timeofs
Definition: client.h:686
client_static_s::frames_dropped
int frames_dropped
Definition: client.h:459
gun_model
qhandle_t gun_model
Definition: view.c:28
explosion_t::ex_light
@ ex_light
Definition: client.h:69
CL_FlyEffect
void CL_FlyEffect(centity_t *ent, vec3_t origin)
Definition: effects.c:1815
client_static_s::recent_head
int recent_head
Definition: client.h:435
CL_CheckForResend
void CL_CheckForResend(void)
Definition: main.c:387
CL_FinalizeCmd
void CL_FinalizeCmd(void)
Definition: input.c:790
intensity
cvar_t * intensity
Definition: god_rays.c:38
client_static_s::measure
struct client_static_s::@1 measure
client_history_t
Definition: client.h:122
client.h
CL_RegisterSounds
void CL_RegisterSounds(void)
Definition: precache.c:203
CL_DeltaFrame
void CL_DeltaFrame(void)
Definition: entities.c:358
centity_s::fly_stoptime
int fly_stoptime
Definition: client.h:103
Con_CheckResize
void Con_CheckResize(void)
Definition: console.c:367
HTTP_Shutdown
#define HTTP_Shutdown()
Definition: client.h:994
client_static_s::disable_screen
unsigned disable_screen
Definition: client.h:381
CL_ResetPrecacheCheck
void CL_ResetPrecacheCheck(void)
Definition: download.c:897
clientinfo_s::skin_name
char skin_name[MAX_QPATH]
Definition: client.h:117
cl_changemapcmd
cvar_t * cl_changemapcmd
Definition: main.c:60
Con_Popup
void Con_Popup(qboolean force)
Definition: console.c:152
mz_params_t::weapon
int weapon
Definition: client.h:674
CL_CheckForIgnore
qboolean CL_CheckForIgnore(const char *s)
Definition: main.c:2043
CL_RunRefresh
void CL_RunRefresh(void)
Definition: refresh.c:232
server_frame_t::number
int number
Definition: client.h:131
LOAD_CLIENTS
@ LOAD_CLIENTS
Definition: client.h:611
scr_vrect
vrect_t scr_vrect
Definition: screen.c:105
CL_ItemRespawnParticles
void CL_ItemRespawnParticles(vec3_t org)
Definition: effects.c:1183
LOAD_MODELS
@ LOAD_MODELS
Definition: client.h:609
DL_PENDING
@ DL_PENDING
Definition: client.h:362
CL_BFGExplosionParticles
void CL_BFGExplosionParticles(vec3_t org)
Definition: effects.c:1905
ca_connecting
@ ca_connecting
Definition: client.h:336
client_static_s::time_frames
unsigned time_frames
Definition: client.h:456
CL_ParticleEffectWaterSplash
void CL_ParticleEffectWaterSplash(vec3_t org, vec3_t dir, int color, int count)
Definition: effects.c:959
SCR_ClearChatHUD_f
void SCR_ClearChatHUD_f(void)
Definition: screen.c:897
client_static_s::realtime
unsigned realtime
Definition: client.h:389
SCR_BeginLoadingPlaque
void SCR_BeginLoadingPlaque(void)
Definition: screen.c:1424
client_static_s::temp
char temp[MAX_QPATH+4]
Definition: client.h:444
ca_loading
@ ca_loading
Definition: client.h:338
CL_BubbleTrail
void CL_BubbleTrail(vec3_t start, vec3_t end)
Definition: effects.c:1718
CL_ClientCommand
void CL_ClientCommand(const char *string)
Definition: main.c:299
cl_sustain_s::color
int color
Definition: client.h:749
client_state_s::lastTransmitTime
unsigned lastTransmitTime
Definition: client.h:177
CL_CleanupDownloads
void CL_CleanupDownloads(void)
Definition: download.c:136
SCR_SizeDown
void SCR_SizeDown(void)
color
static vec4_t color
Definition: mesh.c:33
cl_chat_sound
cvar_t * cl_chat_sound
Definition: main.c:54
client_state_s::history
client_history_t history[CMD_BACKUP]
Definition: client.h:186
CL_UpdateFrameTimes
void CL_UpdateFrameTimes(void)
Definition: main.c:3136
CL_LoadState
void CL_LoadState(load_state_t state)
Definition: console.c:541
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, const char *s)
Definition: precache.c:104
snd_params_t::channel
int channel
Definition: client.h:682
client_state_s::playerEntityAngles
vec3_t playerEntityAngles
Definition: client.h:264
COM_BlockSequenceCRCByte
byte COM_BlockSequenceCRCByte(byte *base, size_t length, int sequence)
Definition: crc.c:148
client_state_s::fov_y
float fov_y
Definition: client.h:255
CL_ColorExplosionParticles
void CL_ColorExplosionParticles(vec3_t org, int color, int run)
Definition: newfx.c:690
client_static_s::snapshots
list_t snapshots
Definition: client.h:467
LOC_LoadLocations
void LOC_LoadLocations(void)
Definition: locs.c:59
cparticle_s::time
float time
Definition: client.h:783
centity_s::maxs
vec3_t maxs
Definition: client.h:89
Con_ClearNotify_f
void Con_ClearNotify_f(void)
Definition: console.c:276
CL_DiminishingTrail
void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
Definition: effects.c:1484
tent_params_t::type
int type
Definition: client.h:660
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: main.c:101
CL_PredictAngles
void CL_PredictAngles(void)
Definition: predict.c:168
CL_GTV_Shutdown
#define CL_GTV_Shutdown()
Definition: client.h:1022
CL_InitAscii
void CL_InitAscii(void)
Definition: ascii.c:370
explosion_t::frametime
int frametime
Definition: client.h:80
client_static_s::serverAddress
netadr_t serverAddress
Definition: client.h:409
CL_BubbleTrail2
void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist)
Definition: newfx.c:228
cparticle_t
struct cparticle_s cparticle_t
CL_RestartRefresh
void CL_RestartRefresh(qboolean total)
Definition: main.c:2483
LOAD_MAP
@ LOAD_MAP
Definition: client.h:608
CL_QueueDownload
qerror_t CL_QueueDownload(const char *path, dltype_t type)
Definition: download.c:49
cl_footsteps
cvar_t * cl_footsteps
Definition: main.c:26
client_state_s::maxclients
int maxclients
Definition: client.h:279
CL_CleanupDemos
void CL_CleanupDemos(void)
Definition: demo.c:1179
SCR_SizeUp
void SCR_SizeUp(void)
client_static_s::protocolVersion
int protocolVersion
Definition: client.h:423
server.h
cl_rollhack
cvar_t * cl_rollhack
Definition: main.c:37
CL_TrackerTrail
void CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
Definition: newfx.c:418
client_static_s::file_size
int file_size
Definition: client.h:463
CL_ParticleSteamEffect
void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: newfx.c:341
mz_params_t::entity
int entity
Definition: client.h:673
dlqueue_t::type
dltype_t type
Definition: client.h:369
Con_DrawConsole
void Con_DrawConsole(void)
Definition: console.c:1032
client_static_s::file_offset
int file_offset
Definition: client.h:464
cparticle_s::alpha
float alpha
Definition: client.h:789
Char_Message
void Char_Message(int key)
Definition: console.c:1289
info_skin
cvar_t * info_skin
Definition: main.c:82
SCR_AddToChatHUD
void SCR_AddToChatHUD(const char *text)
Definition: screen.c:903
tent_params_t::count
int count
Definition: client.h:665
load_state_t
load_state_t
Definition: client.h:606
CL_ParticleEffect3
void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color, int count)
Definition: newfx.c:989
Con_Shutdown
void Con_Shutdown(void)
Definition: console.c:491
tent_params_t::color
int color
Definition: client.h:666
client_static_s::framecount
int framecount
Definition: client.h:388
CL_QuadTrail
void CL_QuadTrail(vec3_t start, vec3_t end)
Definition: effects.c:1388
cl_explosion_sprites
cvar_t * cl_explosion_sprites
Definition: main.c:56
explosion_t::frames
int frames
Definition: client.h:75
client_static_s::position
int position
Definition: client.h:442
client_static_s::netchan
netchan_t * netchan
Definition: client.h:421
IN_Shutdown
void IN_Shutdown(void)
Definition: input.c:173
CL_BigTeleportParticles
void CL_BigTeleportParticles(vec3_t org)
Definition: effects.c:1256
sound.h
centity_s::lerp_origin
vec3_t lerp_origin
Definition: client.h:94
centity_s::serverframe
int serverframe
Definition: client.h:91
CL_ParseServerMessage
void CL_ParseServerMessage(void)
Definition: parse.c:1168
tent_params_t::pos2
vec3_t pos2
Definition: client.h:662
Con_RegisterMedia
void Con_RegisterMedia(void)
Definition: console.c:628
server_frame_t::firstEntity
int firstEntity
Definition: client.h:141
CL_AllocParticle
cparticle_t * CL_AllocParticle(void)
Definition: effects.c:856
info_msg
cvar_t * info_msg
Definition: main.c:85
HTTP_QueueDownload
#define HTTP_QueueDownload(path, type)
Definition: client.h:996
client_state_s::numSolidEntities
int numSolidEntities
Definition: client.h:200
client_state_s::lastTransmitCmdNumberReal
unsigned lastTransmitCmdNumberReal
Definition: client.h:179
cl_sustain_s::think
void(* think)(struct cl_sustain_s *self)
Definition: client.h:752
clientinfo_s
Definition: client.h:112
explosion_t::light
float light
Definition: client.h:76
clientinfo_s::skin
qhandle_t skin
Definition: client.h:114
client_state_s::pmp
pmoveParams_t pmp
Definition: client.h:280
cl_sustain_s::type
int type
Definition: client.h:743
cl_thirdperson_range
cvar_t * cl_thirdperson_range
Definition: main.c:49
CL_InitEffects
void CL_InitEffects(void)
Definition: effects.c:2075
client_state_s::predicted_angles
vec3_t predicted_angles
Definition: client.h:194
explosion_t::ex_explosion
@ ex_explosion
Definition: client.h:63
client_static_s::paused
qboolean paused
Definition: client.h:468
SCR_DrawStringEx
int SCR_DrawStringEx(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font)
Definition: screen.c:139