DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
client.h
Go to the documentation of this file.
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20// client.h
21
22#ifndef CLIENT_H
23#define CLIENT_H
24
25#include "matrixlib.h"
26#include "snd_main.h"
27#include "view.h"
28#include "cap.h"
29#include "cl_parse.h"
30#include "cl_particles.h"
31#include "r_stats.h"
32
33// flags for rtlight rendering
34#define LIGHTFLAG_NORMALMODE 1
35#define LIGHTFLAG_REALTIMEMODE 2
36
37typedef struct tridecal_s
38{
39 // color and initial alpha value
40 float texcoord2f[3][2];
41 float vertex3f[3][3];
42 float color4f[3][4];
43 float plane[4]; // backface culling
44 // how long this decal has lived so far (the actual fade begins at cl_decals_time)
45 float lived;
46 // if >= 0 this indicates the decal should follow an animated triangle
48 // for visibility culling
50 // old decals are killed to obey cl_decals_max
51 unsigned int decalsequence;
52}
54
55typedef struct decalsystem_s
56{
62 float *vertex3f;
63 float *texcoord2f;
64 float *color4f;
66 unsigned short *element3s;
67}
69
70typedef struct effect_s
71{
72 int active;
74 double starttime;
75 float framerate;
79 // these are for interpolation
80 int frame;
81 double frame1time;
82 double frame2time;
83}
85
86typedef struct beam_s
87{
88 int entity;
89 // draw this as lightning polygons, or a model?
91 struct model_s *model;
92 float endtime;
93 vec3_t start, end;
94}
95beam_t;
96
97typedef struct rtlight_particle_s
98{
99 float origin[3];
100 float color[3];
101}
103
104typedef struct rtlight_s
105{
106 // note that the world to light matrices are inversely scaled (divided) by lightradius
107
108 // core properties
118 char cubemapname[64];
120 int style;
134 int flags;
135
136 // generated properties
144
145 // rendering properties, updated each time a light is rendered
146 // this is rtlight->color * d_lightstylevalue
164 struct entity_render_s **cached_lightentities;
165 struct entity_render_s **cached_lightentities_noselfshadow;
166 struct entity_render_s **cached_shadowentities;
167 struct entity_render_s **cached_shadowentities_noselfshadow;
168 unsigned char *cached_shadowtrispvs;
169 unsigned char *cached_lighttrispvs;
171 // reduced light cullbox from GetLightInfo
174 // current shadow-caster culling planes based on view
175 // (any geometry outside these planes can not contribute to the visible
176 // shadows in any way, and thus can be culled safely)
178 mplane_t cached_frustumplanes[5]; // see R_Shadow_ComputeShadowCasterCullingPlanes
179
188 int shadowmapatlasposition[2];
197 unsigned char *static_leafpvs;
208 unsigned char *static_shadowtrispvs;
213 unsigned char *static_lighttrispvs;
222
224 float bouncegrid_photoncolor[3];
229}
231
232typedef struct dlight_s
233{
234 // destroy light after this time
235 // (dlight only)
237 // the entity that owns this light (can be NULL)
238 // (dlight only)
239 struct entity_render_s *ent;
240 // location
241 // (worldlight: saved to .rtlights file)
243 // worldlight orientation
244 // (worldlight only)
245 // (worldlight: saved to .rtlights file)
247 // dlight orientation/scaling/location
248 // (dlight only)
250 // color of light
251 // (worldlight: saved to .rtlights file)
253 // cubemap name to use on this light
254 // (worldlight: saved to .rtlights file)
255 char cubemapname[64];
256 // make light flash while selected
257 // (worldlight only)
259 // brightness (not really radius anymore)
260 // (worldlight: saved to .rtlights file)
262 // drop intensity this much each second
263 // (dlight only)
265 // intensity value which is dropped over time
266 // (dlight only)
268 // initial values for intensity to modify
269 // (dlight only)
272 // light style which controls intensity of this light
273 // (worldlight: saved to .rtlights file)
274 int style;
275 // cast shadows
276 // (worldlight: saved to .rtlights file)
278 // corona intensity
279 // (worldlight: saved to .rtlights file)
281 // radius scale of corona to render (1.0 means same as light radius)
282 // (worldlight: saved to .rtlights file)
284 // ambient intensity to render
285 // (worldlight: saved to .rtlights file)
287 // diffuse intensity to render
288 // (worldlight: saved to .rtlights file)
290 // specular intensity to render
291 // (worldlight: saved to .rtlights file)
293 // LIGHTFLAG_* flags
294 // (worldlight: saved to .rtlights file)
295 int flags;
296 // linked list of world lights
297 // (worldlight only)
298 struct dlight_s *next;
299 // embedded rtlight struct for renderer
300 // (worldlight only)
302}
304
305// this is derived from processing of the framegroupblend array
306// note: technically each framegroupblend can produce two of these, but that
307// never happens in practice because no one blends between more than 2
308// framegroups at once
309#define MAX_FRAMEBLENDS (MAX_FRAMEGROUPBLENDS * 2)
310typedef struct frameblend_s
311{
313 float lerp;
314}
316
317// LadyHavoc: this struct is intended for the renderer but some fields are
318// used by the client.
319//
320// The renderer should not rely on any changes to this struct to be persistent
321// across multiple frames because temp entities are wiped every frame, but it
322// is acceptable to cache things in this struct that are not critical.
323//
324// For example the r_cullentities_trace code does such caching.
325typedef struct entity_render_s
326{
327 // location
328 //vec3_t origin;
329 // orientation
330 //vec3_t angles;
331 // transform matrix for model to world
333 // transform matrix for world to model
335 // opacity (alpha) of the model
336 float alpha;
337 // size the model is shown
338 float scale;
339 // transparent sorting offset
341
342 // NULL = no model
344 // number of the entity represents, or 0 for non-network entities
346 // literal colormap colors for renderer, if both are 0 0 0 it is not colormapped
349 // light, particles, etc
351 // qw CTF flags and other internal-use-only effect bits
353 // for Alias models
355 // render flags
356 int flags;
357
358 // colormod tinting of models
359 float colormod[3];
360 float glowmod[3];
361
362 // interpolated animation - active framegroups and blend factors
364
365 // time of last model change (for shader animations)
367
368 // calculated by the renderer (but not persistent)
369
370 // calculated during R_AddModelEntities
372 // subframe numbers (-1 if not used) and their blending scalers (0-1), if interpolation is not desired, use subframeblend[0].subframe
374 // skeletal animation data (if skeleton.relativetransforms is not NULL, it overrides frameblend)
376
377 // animation cache (pointers allocated using R_FrameData_Alloc)
378 // ONLY valid during R_RenderView! may be NULL (not cached)
391 // gpu-skinning shader needs transforms in a certain format, we have to
392 // upload this to a uniform buffer for the shader to use, and also keep a
393 // backup copy in system memory for the dynamic batch fallback code
394 // if this is not NULL, the other animcache variables are NULL
399
400 // CL_UpdateEntityShading reads these fields
401 // used only if RENDER_CUSTOMIZEDMODELLIGHT is set
405 // CSQC entities get their shading from the root of their attachment chain
406 float custommodellight_origin[3];
407
408 // derived lighting parameters (CL_UpdateEntityShading)
409
410 // used by MATERIALFLAG_FULLBRIGHT which is MATERIALFLAG_MODELLIGHT with
411 // this as ambient color, along with MATERIALFLAG_NORTLIGHT
412 float render_fullbright[3];
413 // color tint for the base pass glow textures if any
414 float render_glowmod[3];
415 // MATERIALFLAG_MODELLIGHT uses these parameters
416 float render_modellight_ambient[3];
417 float render_modellight_diffuse[3];
418 float render_modellight_lightdir_world[3];
419 float render_modellight_lightdir_local[3];
420 float render_modellight_specular[3];
421 // lightmap rendering (not MATERIALFLAG_MODELLIGHT)
422 float render_lightmap_ambient[3];
423 float render_lightmap_diffuse[3];
424 float render_lightmap_specular[3];
425 // rtlights use these colors for the materials on this entity
426 float render_rtlight_diffuse[3];
427 float render_rtlight_specular[3];
428 // ignore lightmap and use fixed lighting settings on this entity (e.g. FULLBRIGHT)
430 // do not process per pixel lights on this entity at all (like MATERIALFLAG_NORTLIGHT)
432 // use the 3D lightmap from q3bsp on this entity
434
435 // storage of decals on this entity
436 // (note: if allowdecals is set, be sure to call R_DecalSystem_Reset on removal!)
439
440 // FIELDS UPDATED BY RENDERER:
441 // last time visible during trace culling
443
444 // user wavefunc parameters (from csqc)
445 vec_t userwavefunc_param[Q3WAVEFUNC_USER_COUNT];
446}
448
449typedef struct entity_persistent_s
450{
451 vec3_t trail_origin; // previous position for particle trail spawning
458 float muzzleflash; // muzzleflash intensity, fades over time
459 float trail_time; // residual error accumulation for particle trail spawning (to keep spacing across frames)
460 qbool trail_allowed; // set to false by teleports, true by update code, prevents bad lerps
461}
463
464typedef struct entity_s
465{
466 // baseline state (default values)
468 // previous state (interpolating from this)
470 // current state (interpolating to this)
472
473 // used for regenerating parts of render
475
476 // the only data the renderer should know about
478}
480
481typedef struct lightstyle_s
482{
486
487typedef struct scoreboard_s
488{
490 int frags;
491 int colors; // two 4 bit fields
492 // QW fields:
494 char qw_userinfo[MAX_USERINFO_STRING];
500 char qw_team[8];
501 char qw_skin[MAX_QPATH];
503
504typedef struct cshift_s
505{
506 float destcolor[3];
507 float percent; // 0-255
508 float alphafade; // (any speed)
509} cshift_t;
510
511#define CSHIFT_CONTENTS 0
512#define CSHIFT_DAMAGE 1
513#define CSHIFT_BONUS 2
514#define CSHIFT_POWERUP 3
515#define CSHIFT_VCSHIFT 4
516#define NUM_CSHIFTS 5
517
518#define NAME_LENGTH 64
519
520
521//
522// client_state_t should hold all pieces of the client state
523//
524
525#define SIGNONS 4 // signon messages to receive before connected
526
527typedef enum cactive_e
528{
529 ca_uninitialized, // during early startup
530 ca_dedicated, // a dedicated server with no ability to start a client
531 ca_disconnected, // full screen console with no connection
532 ca_connected // valid netcon, talking to a server
535
536typedef enum qw_downloadtype_e
537{
545
546#define CL_MAX_DOWNLOADACKS 4
547
548typedef struct cl_downloadack_s
549{
550 int start, size;
551}
553
554typedef struct cl_soundstats_s
555{
559}
561
562//
563// the client_static_t structure is persistent through an arbitrary number
564// of server connections
565//
566typedef struct client_static_s
567{
569
570 // all client memory allocations go in these pools
573
574// demo loop control
575 // -1 = don't play demos
577 // list of demos in loop
579 // the actively playing demo (set by CL_PlayDemo)
580 char demoname[MAX_QPATH];
581
582// demo recording info must be here, because record is started before
583// entering a map (and clearing client_state_t)
588 qbool demostarting; // set if currently starting a demo, to stop -demo from quitting when switching to another demo
590 // -1 = use normal cd track
592 qfile_t *demofile;
593 // realtime at second frame of timedemo (LadyHavoc: changed to double)
595 int td_frames; // total frames parsed
603 // LadyHavoc: pausedemo
605
606 // sound mixer statistics for showsound display
608
615 // protocol version of the server we're connected to
616 // (kept outside client_state_t because it's used between levels)
618
619#define MAX_RCONS 16
621 lhnetaddress_t rcon_addresses[MAX_RCONS];
622 char rcon_commands[MAX_RCONS][MAX_INPUTLINE];
623 double rcon_timeout[MAX_RCONS];
625
626// connection information
627 // 0 to SIGNONS
629 // network connection
631
632 // download information
633 // (note: qw_download variables are also used)
635
636 // input sequence numbers are not reset on level change, only connect
637 unsigned int servermovesequence;
638
639 // quakeworld stuff below
640
641 // value of "qport" cvar at time of connection
643 // copied from cls.netcon->qw. variables every time they change, or set by demos (which have no cls.netcon)
646
647 // current file download buffer (only saved when file is completed)
648 char qw_downloadname[MAX_QPATH];
649 unsigned char *qw_downloadmemory;
655 // transfer rate display
660
661 // current file upload buffer (for uploading screenshots to server)
662 unsigned char *qw_uploaddata;
665
666 // user infostring
667 // this normally contains the following keys in quakeworld:
668 // password spectator name team skin topcolor bottomcolor rate noaim msg *ver *ip
669 char userinfo[MAX_USERINFO_STRING];
670
671 // extra user info for the "connect" command
672 char connect_userinfo[MAX_USERINFO_STRING];
673
674#ifdef CONFIG_VIDEO_CAPTURE
675 // video capture stuff
676 capturevideostate_t capturevideo;
677#endif
678
679 // crypto channel
681
682 // ProQuake compatibility stuff
683 int proquake_servermod; // 0 = not proquake, 1 = proquake
684 int proquake_serverversion; // actual proquake server version * 10 (3.40 = 34, etc)
685 int proquake_serverflags; // 0 (PQF_CHEATFREE not supported)
686
687 // don't write-then-read csprogs.dat (useful for demo playback)
688 unsigned char *caughtcsprogsdata;
690
694
695 // graph scales
696 int r_speeds_graph_datamin[r_stat_count];
697 int r_speeds_graph_datamax[r_stat_count];
698}
700
701extern client_static_t cls;
702
703//[515]: csqc
710
720
721typedef struct cl_locnode_s
722{
723 struct cl_locnode_s *next;
724 char *name;
726}
728
729typedef struct showlmp_s
730{
732 float x;
733 float y;
734 char label[32];
735 char pic[128];
736}
738
739//
740// the client_state_t structure is wiped completely at every
741// server signon
742//
743typedef struct client_state_s
744{
745 // true if playing in a local game and no one else is connected
747
748 // send a clc_nop periodically until connected
750
751 // current input being accumulated by mouse/joystick/etc input
753 // latest moves sent to the server that have not been confirmed yet
755
756// information for local display
757 // health, etc
758 int stats[MAX_CL_STATS];
759 float *statsf; // points to stats[] array
760 // last known inventory bit flags, for blinking
762 // cl.time of acquiring item, for blinking
763 float item_gettime[32];
764 // last known STAT_ACTIVEWEAPON
766 // cl.time of changing STAT_ACTIVEWEAPON
768 // use pain anim frame if cl.time < this
770 // for stair smoothing
773
774 // color shifts for damage, powerups
776 // and content types
777 cshift_t prev_cshifts[NUM_CSHIFTS];
778
779// the client maintains its own idea of view angles, which are
780// sent to the server each frame. The server sets punchangle when
781// the view is temporarily offset, and an angle reset commands at the start
782// of each level and after teleporting.
783
784 // mviewangles is read from demo
785 // viewangles is either client controlled or lerped from mviewangles
786 vec3_t mviewangles[2], viewangles;
787 // update by server, used by qc to do weapon recoil
788 vec3_t mpunchangle[2], punchangle;
789 // update by server, can be used by mods to kick view around
790 vec3_t mpunchvector[2], punchvector;
791 // update by server, used for lean+bob (0 is newest)
792 vec3_t mvelocity[2], velocity;
793 // update by server, can be used by mods for zooming
794 vec_t mviewzoom[2], viewzoom;
795 // if true interpolation the mviewangles and other interpolation of the
796 // player is disabled until the next network packet
797 // this is used primarily by teleporters, and when spectating players
798 // special checking of the old fixangle[1] is used to differentiate
799 // between teleporting and spectating
801
802 // client movement simulation
803 // these fields are only updated by CL_ClientMovement (called by CL_SendMove after parsing each network packet)
804 // set by CL_ClientMovement_Replay functions
806 // if true the CL_ClientMovement_Replay function will update origin, etc
808 // simulated data (this is valid even if cl.movement is false)
811 // whether the replay should allow a jump at the first sequence
813
814 // previous gun angles (for leaning effects)
819 // previous gun angles (for leaning effects)
824
825// pitch drifting vars
827 float pitchvel;
830 double laststop;
831
832//[515]: added for csqc purposes
834 csqc_vidvars_t csqc_vidvars; //[515]: these parms must be set to true by default
836 struct model_s *csqc_model_precache[MAX_MODELS];
837
838 // local amount for smoothing stepups
839 //float crouch;
840
841 // sent by server
845
846 // used by bob
854
855 // don't change view angle, full screen, etc
857 // latched at intermission start
859
860 // the timestamp of the last two messages
861 double mtime[2];
862
863 // clients view of time, time should be between mtime[0] and mtime[1] to
864 // generate a lerp point for other data, oldtime is the previous frame's
865 // value of time, frametime is the difference between time and oldtime
866 // note: cl.time may be beyond cl.mtime[0] if packet loss is occuring, it
867 // is only forcefully limited when a packet is received
868 double time, oldtime;
869 // how long it has been since the previous client frame in real time
870 // (not game time, for that use cl.time - cl.oldtime)
872
873 // used by cl_nettimesyncboundmode 7
874#define NUM_TS_ERRORS 32 // max 256
875 unsigned char ts_error_num;
876 float ts_error_stor[NUM_TS_ERRORS];
877
878 // fade var for fading while dead
880
881 // motionblur alpha level variable
883
884 // copy of realtime from last recieved message, for net trouble icon
886
887// information that is static for the entire time connected to a server
888 struct model_s *model_precache[MAX_MODELS];
889 struct sfx_s *sound_precache[MAX_SOUNDS];
890
891 // FIXME: this is a lot of memory to be keeping around, this really should be dynamically allocated and freed somehow
892 char model_name[MAX_MODELS][MAX_QPATH];
893 char sound_name[MAX_SOUNDS][MAX_QPATH];
894
895 // for display on solo scoreboard
896 char worldmessage[MAX_QPATH]; // map title (not related to filename)
897 // variants of map name
898 char worldbasename[MAX_QPATH]; // %s
899 char worldname[MAX_QPATH]; // maps/%s.bsp
900 char worldnamenoextension[MAX_QPATH]; // maps/%s
901 // cl_entitites[cl.viewentity] = player
903 // the real player entity (normally same as viewentity,
904 // different than viewentity if mod uses chasecam or other tricks)
906 // this is updated to match cl.viewentity whenever it is in the clients
907 // range, basically this is used in preference to cl.realplayerentity for
908 // most purposes because when spectating another player it should show
909 // their information rather than yours
911 // max players that can be in this game
913 // type of game (deathmatch, coop, singleplayer)
915
916 // models and sounds used by engine code (particularly cl_parse.c)
923 sfx_t *sfx_tink1;
924 sfx_t *sfx_ric1;
925 sfx_t *sfx_ric2;
926 sfx_t *sfx_ric3;
928 // indicates that the file "sound/misc/talk2.wav" was found (for use by team chat messages)
930
931// refresh related state
932
933 // cl_entitites[0].model
934 struct model_s *worldmodel;
935
936 // the gun model
938
939 // cd audio
940 int cdtrack, looptrack;
941
942// frag scoreboard
943
944 // [cl.maxclients]
946
947 // keep track of svc_print parsing state (analyzes ping reports and status reports)
950 // set by scoreboard code when sending ping command, this causes the next ping results to be hidden
951 // (which could eat the wrong ping report if the player issues one
952 // manually, but they would still see a ping report, just a later one
953 // caused by the scoreboard code rather than the one they intentionally
954 // issued)
956
957 // entity database stuff
958 // latest received entity frame numbers
959#define LATESTFRAMENUMS 32
961 int latestframenums[LATESTFRAMENUMS];
962 unsigned int latestsendnums[LATESTFRAMENUMS];
966
967 // keep track of quake entities because they need to be killed if they get stale
969 unsigned char isquakeentity[MAX_EDICTS];
970
971 // bounding boxes for clientside movement
976
977 // old decals are killed based on this
978 unsigned int decalsequence;
979
990
993 unsigned char *entities_active;
1002
1012
1017
1018 // cl_serverextension_download feature
1029
1030 // quakeworld stuff
1031
1032 // local copy of the server infostring
1033 char qw_serverinfo[MAX_SERVERINFO_STRING];
1034
1035 // time of last qw "pings" command sent to server while showing scores
1037
1038 // used during connect
1040
1041 // updated from serverinfo
1043
1044 // unused: indicates whether the player is spectating
1045 // use cl.scores[cl.playerentity-1].qw_spectator instead
1046 //qbool qw_spectator;
1047
1048 // time accumulated since an input packet was sent
1050 // how many optimally timed inputs we sent since we received an update from the server
1052
1053 // movement parameters for client prediction
1054 unsigned int moveflags;
1088
1089 // models used by qw protocol
1094
1097
1098 // 255 is the most nails the QW protocol could send
1100 vec_t qw_nails[255][6];
1101
1103
1104 unsigned int qw_validsequence;
1105
1106 unsigned int qw_deltasequence[QW_UPDATE_BACKUP];
1107
1108 // csqc stuff:
1109 // server entity number corresponding to a clientside entity
1110 unsigned short csqc_server2csqcentitynumber[MAX_EDICTS];
1118 char csqc_printtextbuf[MAX_INPUTLINE];
1120
1121 // collision culling data
1123
1124 // loc file stuff (points and boxes describing locations in the level)
1126 // this is updated to cl.movement_origin whenever health is < 1
1127 // used by %d print in say/say_team messages if cl_locs_enable is on
1129
1130 // processing buffer used by R_BuildLightMap, reallocated as needed,
1131 // freed on each level change
1133 unsigned char *buildlightmapmemory;
1134
1135 // used by EntityState5_ReadUpdate
1137
1138 // used by underwater sound filter (snd_waterfx)
1140}
1142
1143//
1144// cvars
1145//
1146extern cvar_t cl_name;
1147extern cvar_t cl_color;
1148extern cvar_t cl_rate;
1150extern cvar_t cl_pmodel;
1151extern cvar_t cl_playermodel;
1152extern cvar_t cl_playerskin;
1153
1154extern cvar_t rcon_password;
1155extern cvar_t rcon_address;
1156
1157extern cvar_t cl_upspeed;
1158extern cvar_t cl_forwardspeed;
1159extern cvar_t cl_backspeed;
1160extern cvar_t cl_sidespeed;
1161
1162extern cvar_t cl_movespeedkey;
1163
1164extern cvar_t cl_yawspeed;
1165extern cvar_t cl_pitchspeed;
1166
1168
1169extern cvar_t cl_autofire;
1170
1171extern cvar_t cl_shownet;
1175
1177extern cvar_t lookspring;
1178extern cvar_t lookstrafe;
1179extern cvar_t sensitivity;
1180
1181extern cvar_t freelook;
1182
1183extern cvar_t m_pitch;
1184extern cvar_t m_yaw;
1185extern cvar_t m_forward;
1186extern cvar_t m_side;
1187
1188extern cvar_t cl_autodemo;
1191extern cvar_t cl_startdemos;
1192
1193extern cvar_t r_draweffects;
1194
1200extern cvar_t cl_stainmaps;
1202
1203extern cvar_t cl_prydoncursor;
1205
1206extern cvar_t cl_locs_enable;
1207
1209
1210extern client_state_t cl;
1211
1212extern void CL_AllocLightFlash (entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, char *cubemapname, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags);
1213
1215void CL_Locs_FindLocationName(char *buffer, size_t buffersize, vec3_t point);
1216
1217//=============================================================================
1218
1219//
1220// cl_main
1221//
1222
1223double CL_Frame(double time);
1224
1225void CL_Shutdown (void);
1226void CL_Init (void);
1227
1228void CL_StartVideo(void);
1229
1230void CL_EstablishConnection(const char *host, int firstarg);
1231
1232void CL_Disconnect(void);
1233void CL_DisconnectEx(qbool kicked, const char *reason, ... );
1235
1238void CL_UpdateViewEntities(void);
1239
1240//
1241// cl_input
1242//
1243typedef struct kbutton_s
1244{
1245 int down[2]; // key nums holding it down
1246 int state; // low bit is down state
1247}
1248kbutton_t;
1249
1251extern kbutton_t in_strafe;
1252extern kbutton_t in_speed;
1253
1254void CL_InitInput (void);
1255void CL_SendMove (void);
1256
1260void CL_ParseTEnt (void);
1261void CL_NewBeam (int ent, vec3_t start, vec3_t end, model_t *m, int lightning);
1262void CL_RelinkBeams (void);
1263void CL_Beam_CalculatePositions (const beam_t *b, vec3_t start, vec3_t end);
1264void CL_ClientMovement_Replay(void);
1265
1266void CL_ClearTempEntities (void);
1267entity_render_t *CL_NewTempEntity (double shadertime);
1268
1269void CL_Effect(vec3_t org, model_t *model, int startframe, int framecount, float framerate);
1270
1271void CL_ClearState (void);
1272void CL_ExpandEntities(int num);
1273void CL_ExpandCSQCRenderEntities(int num);
1274void CL_SetInfo(const char *key, const char *value, qbool send, qbool allowstarkey, qbool allowmodel, qbool quiet);
1275
1276
1277void CL_UpdateWorld (void);
1279void CL_Input (void);
1280extern int cl_ignoremousemoves;
1281
1282
1283float CL_KeyState (kbutton_t *key);
1284
1285//
1286// cl_cmd.c
1287//
1290void CL_ForwardToServer (const char *s);
1291
1296void CL_InitCommands(void);
1297
1298
1299//
1300// cl_demo.c
1301//
1302void CL_StopPlayback(void);
1303void CL_ReadDemoMessage(void);
1304void CL_WriteDemoMessage(sizebuf_t *mesage);
1305
1306void CL_CutDemo(unsigned char **buf, fs_offset_t *filesize);
1307void CL_PasteDemo(unsigned char **buf, fs_offset_t *filesize);
1308
1309void CL_PlayDemo(const char *demo);
1310void CL_NextDemo(void);
1315
1316void CL_Demo_Init(void);
1317
1318
1319#include "cl_screen.h"
1320
1321extern qbool sb_showscores;
1322
1331
1332typedef struct cl_clientmovement_state_s
1333{
1334 // entity to be ignored for movement
1335 struct prvm_edict_s *self;
1336 // position
1339 // current bounding box (different if crouched vs standing)
1342 // currently on the ground
1344 // currently crouching
1346 // what kind of water (SUPERCONTENTS_LAVA for instance)
1348 // how deep
1350 // weird hacks when jumping out of water
1351 // (this is in seconds and counts down to 0)
1353
1354 // user command
1356}
1359
1360// warpzone prediction hack (CSQC builtin)
1361void CL_RotateMoves(const matrix4x4_t *m);
1362
1363typedef enum meshname_e {
1364 MESH_SCENE, // CSQC R_PolygonBegin, potentially also engine particles and debug stuff
1367} meshname_t;
1370extern const char *cl_meshentitynames[NUM_MESHENTITIES];
1371#define CL_Mesh_Scene() (&cl_meshentitymodels[MESH_SCENE])
1372#define CL_Mesh_UI() (&cl_meshentitymodels[MESH_UI])
1373void CL_MeshEntities_Init(void);
1377void CL_UpdateEntityShading(void);
1378
1379void CL_NewFrameReceived(int num);
1380void CL_ParseEntityLump(char *entitystring);
1381void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius);
1382void CL_RelinkLightFlashes(void);
1383void CL_Beam_AddPolygons(const beam_t *b);
1384void CL_UpdateMoveVars(void);
1386
1387#endif
1388
void CL_MeshEntities_Scene_AddRenderEntity(void)
Definition cl_main.c:2599
void CL_PlayDemo_f(cmd_state_t *cmd)
Definition cl_demo.c:468
void CL_WriteDemoMessage(sizebuf_t *mesage)
Definition cl_demo.c:110
cvar_t cl_yawspeed
Definition cl_input.c:372
void CL_UpdateViewEntities(void)
Definition cl_main.c:1432
model_t cl_meshentitymodels[NUM_MESHENTITIES]
Definition cl_main.c:2514
cvar_t cl_explosions_lifetime
Definition cl_main.c:73
cvar_t rcon_password
Definition console.c:89
#define LATESTFRAMENUMS
Definition client.h:959
waterlevel_t
Definition client.h:1324
@ WATERLEVEL_WETFEET
Definition client.h:1326
@ WATERLEVEL_SUBMERGED
Definition client.h:1328
@ WATERLEVEL_SWIMMING
Definition client.h:1327
@ WATERLEVEL_NONE
Definition client.h:1325
cvar_t cl_backspeed
Definition cl_input.c:366
void CL_Stop_f(cmd_state_t *cmd)
Definition cl_demo.c:307
double CL_Frame(double time)
Definition cl_main.c:2802
cvar_t cl_sidespeed
Definition cl_input.c:367
void CL_MeshEntities_Scene_FinalizeRenderEntity(void)
Definition cl_main.c:2605
void CL_UpdateWorld(void)
Definition cl_main.c:2052
qbool sb_showscores
Definition sbar.c:56
cvar_t cl_autodemo_delete
Definition cl_main.c:64
kbutton_t in_klook
Definition client.h:1250
void CL_UpdateRenderEntity(entity_render_t *ent)
Definition cl_main.c:702
void CL_WriteToServer(void)
void CL_Beam_CalculatePositions(const beam_t *b, vec3_t start, vec3_t end)
Definition cl_main.c:1851
void CL_Input(void)
Definition cl_input.c:483
cvar_t freelook
Definition cl_main.c:60
cvar_t lookspring
Definition cl_main.c:51
cvar_t cl_pitchspeed
Definition cl_input.c:373
void CL_ForwardToServer_f(cmd_state_t *cmd)
adds the current command line as a clc_stringcmd to the client message.
Definition cl_cmd.c:174
cvar_t cl_pitchdriftspeed
cvar_t cl_playerskin
Definition common.c:37
cvar_t cl_prydoncursor_notrace
Definition cl_main.c:93
void CL_DisconnectEx(qbool kicked, const char *reason,...)
Definition cl_main.c:370
meshname_t
Definition client.h:1363
@ NUM_MESHENTITIES
Definition client.h:1366
@ MESH_UI
Definition client.h:1365
@ MESH_SCENE
Definition client.h:1364
cvar_t cl_upspeed
Definition cl_input.c:364
void CL_PasteDemo(unsigned char **buf, fs_offset_t *filesize)
Definition cl_demo.c:160
void CL_Disconnect_f(cmd_state_t *cmd)
Definition cl_main.c:559
void CL_ReadDemoMessage(void)
Definition cl_demo.c:187
cvar_t cl_stainmaps_clearonload
Definition cl_main.c:76
cvar_t m_side
Definition cl_main.c:58
cvar_t cl_playermodel
Definition common.c:36
void CL_Effect(vec3_t org, model_t *model, int startframe, int framecount, float framerate)
Definition cl_main.c:816
cvar_t m_yaw
Definition cl_main.c:56
void CL_ClientMovement_Replay(void)
Definition cl_input.c:1607
void CL_ClearTempEntities(void)
Definition cl_main.c:781
void CL_NewFrameReceived(int num)
Definition cl_input.c:1737
void CL_RotateMoves(const matrix4x4_t *m)
Definition cl_input.c:1746
cactive_t
Definition client.h:528
@ ca_dedicated
Definition client.h:530
@ ca_connected
Definition client.h:532
@ ca_uninitialized
Definition client.h:529
@ ca_disconnected
Definition client.h:531
void CL_Locs_FindLocationName(char *buffer, size_t buffersize, vec3_t point)
Definition cl_main.c:2218
cvar_t m_forward
Definition cl_main.c:57
void CL_LerpUpdate(entity_t *e)
cvar_t cl_nettimesyncboundmode
Definition cl_parse.c:192
cvar_t cl_color
Definition cl_cmd.c:252
entity_render_t * CL_NewTempEntity(double shadertime)
Definition cl_main.c:794
int cl_ignoremousemoves
Definition cl_input.c:474
cvar_t cl_rate_burstsize
Definition cl_cmd.c:34
cvar_t cl_explosions_size_start
Definition cl_main.c:71
void CL_ParseEntityLump(char *entitystring)
Definition cl_parse.c:384
void CL_ExpandCSQCRenderEntities(int num)
Definition cl_main.c:325
void CL_InitInput(void)
Definition cl_input.c:2209
void CL_TimeDemo_f(cmd_state_t *cmd)
Definition cl_demo.c:612
kbutton_t in_speed
Definition cl_input.c:54
void CL_MoveLerpEntityStates(entity_t *ent)
Definition cl_parse.c:1991
void CL_StartVideo(void)
Definition cl_main.c:2786
void CL_RelinkBeams(void)
Definition cl_main.c:1884
cvar_t cl_locs_enable
Definition cl_main.c:97
void CL_AllocLightFlash(entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, char *cubemapname, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags)
Definition cl_main.c:852
kbutton_t in_strafe
Definition cl_input.c:54
void CL_NewBeam(int ent, vec3_t start, vec3_t end, model_t *m, int lightning)
Definition cl_parse.c:2356
cvar_t cl_rate
Definition cl_cmd.c:33
#define CL_MAX_DOWNLOADACKS
Definition client.h:546
void CL_ValidateState(entity_state_t *s)
Definition cl_parse.c:1962
void CL_Record_f(cmd_state_t *cmd)
Definition cl_demo.c:346
cvar_t cl_explosions_size_end
Definition cl_main.c:72
void CL_CutDemo(unsigned char **buf, fs_offset_t *filesize)
Definition cl_demo.c:137
#define NUM_TS_ERRORS
Definition client.h:874
void CL_StopPlayback(void)
Definition cl_demo.c:81
void CL_SendMove(void)
Definition cl_input.c:1771
void CL_ClientMovement_PlayerMove_Frame(cl_clientmovement_state_t *s)
Definition cl_input.c:1586
cvar_t cl_stainmaps
Definition cl_main.c:75
cvar_t r_draweffects
Definition cl_main.c:67
void CL_PlayDemo(const char *demo)
Definition cl_demo.c:413
cl_locnode_t * CL_Locs_FindNearest(const vec3_t point)
Definition cl_main.c:2193
cvar_t cl_nettimesyncfactor
Definition cl_parse.c:191
cvar_t cl_anglespeedkey
Definition cl_input.c:375
void CL_InitCommands(void)
Definition cl_cmd.c:742
#define NUM_CSHIFTS
Definition client.h:516
client_state_t cl
Definition cl_main.c:117
void CL_RelinkLightFlashes(void)
Definition cl_main.c:935
cvar_t cl_autodemo
Definition cl_main.c:62
cvar_t cl_nettimesyncboundtolerance
Definition cl_parse.c:193
cvar_t sensitivity
Definition cl_main.c:53
cvar_t cl_name
User-visible names of these CF_USERINFO cvars must be matched in CL_SetInfo()!
Definition cl_cmd.c:32
cvar_t cl_movespeedkey
Definition cl_input.c:369
client_static_t cls
Definition cl_main.c:116
cvar_t rcon_address
Definition console.c:92
void CL_NextDemo(void)
Definition cl_demo.c:50
void CL_Demo_Init(void)
Definition cl_demo.c:737
void CL_Locs_Reload_f(cmd_state_t *cmd)
Definition cl_main.c:2377
cvar_t cl_autodemo_nameformat
Definition cl_main.c:63
void CL_SetInfo(const char *key, const char *value, qbool send, qbool allowstarkey, qbool allowmodel, qbool quiet)
Definition cl_main.c:233
cvar_t cl_shownet
Definition cl_main.c:42
void CL_Disconnect(void)
Definition cl_main.c:478
float CL_KeyState(kbutton_t *key)
Definition cl_input.c:315
#define MAX_FRAMEBLENDS
Definition client.h:309
void CL_Beam_AddPolygons(const beam_t *b)
void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius)
cvar_t cl_autofire
void CL_ForwardToServer(const char *s)
adds the string as a clc_stringcmd to the client message.
Definition cl_cmd.c:54
void CL_SetEntityColormapColors(entity_render_t *ent, int colormap)
Definition cl_main.c:1061
cvar_t cl_explosions_alpha_start
Definition cl_main.c:69
const char * cl_meshentitynames[NUM_MESHENTITIES]
Definition cl_main.c:2515
cvar_t cl_startdemos
Definition cl_main.c:65
qw_downloadtype_t
Definition client.h:537
@ dl_sound
Definition client.h:542
@ dl_none
Definition client.h:538
@ dl_single
Definition client.h:539
@ dl_model
Definition client.h:541
@ dl_skin
Definition client.h:540
void CL_UpdateMoveVars(void)
Definition cl_input.c:1495
void CL_UpdateEntityShading(void)
Definition cl_main.c:2777
void CL_MeshEntities_Scene_Clear(void)
Definition cl_main.c:2594
cvar_t cl_explosions_alpha_end
Definition cl_main.c:70
cl_parsingtextmode_t
Definition client.h:712
@ CL_PARSETEXTMODE_STATUS_PLAYERIP
Definition client.h:717
@ CL_PARSETEXTMODE_PING
Definition client.h:714
@ CL_PARSETEXTMODE_STATUS_PLAYERID
Definition client.h:716
@ CL_PARSETEXTMODE_NONE
Definition client.h:713
@ CL_PARSETEXTMODE_STATUS
Definition client.h:715
void CL_EstablishConnection(const char *host, int firstarg)
Definition cl_main.c:574
void CL_ExpandEntities(int num)
Definition cl_main.c:300
void CL_MeshEntities_Init(void)
Definition cl_main.c:2555
void CL_Shutdown(void)
Definition cl_main.c:2951
kbutton_t in_mlook
Definition cl_input.c:51
void CL_ClearState(void)
Definition cl_main.c:125
cvar_t cl_pmodel
Definition cl_cmd.c:40
cvar_t cl_prydoncursor
Definition cl_main.c:92
entity_t cl_meshentities[NUM_MESHENTITIES]
Definition cl_main.c:2513
cvar_t m_pitch
Definition cl_main.c:55
void CL_Init(void)
Definition cl_main.c:2988
cvar_t lookstrafe
Definition cl_main.c:52
cvar_t cl_forwardspeed
Definition cl_input.c:365
#define MAX_RCONS
Definition client.h:619
cvar_t cl_areagrid_link_SOLID_NOT
Definition cl_main.c:112
void CL_ParseTEnt(void)
protocolversion_t
Definition common.h:132
float flags
vector mins
vector velocity
float time
float colormap
vector origin
string model
float style
vector color
vector glowmod
float viewzoom
vector punchvector
vector colormod
int64_t fs_offset_t
Definition fs.h:37
GLsizei const GLfloat * value
Definition glquake.h:740
GLuint buffer
Definition glquake.h:630
GLclampf GLclampf blue
Definition glquake.h:642
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition glquake.h:657
const GLchar * name
Definition glquake.h:601
GLclampf green
Definition glquake.h:642
host_static_t host
Definition host.c:41
void cmd(string command,...)
vector punchangle
Definition progsdefs.qc:117
float fixangle
Definition progsdefs.qc:160
#define MAX_FRAMEGROUPBLENDS
Definition protocol.h:408
#define QW_UPDATE_BACKUP
Definition protocol.h:1033
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
Definition qdefs.h:94
#define MAX_STYLESTRING
max length of flicker pattern for light style
Definition qdefs.h:109
#define MAX_EDICTS
max number of objects in game world at once (32768 protocol limit)
Definition qdefs.h:105
#define MAX_USERINFO_STRING
max length of infostring for PROTOCOL_QUAKEWORLD (196 in QuakeWorld)
Definition qdefs.h:112
#define MAX_SOUNDS
max number of sounds loaded at once
Definition qdefs.h:107
#define MAX_DEMONAME
max demo name length for demos command
Definition qdefs.h:119
#define MAX_SCOREBOARDNAME
max length of player name in game
Definition qdefs.h:111
#define MAX_QPATH
max length of a quake game pathname
Definition qdefs.h:169
#define MAX_SERVERINFO_STRING
max length of server infostring for PROTOCOL_QUAKEWORLD (512 in QuakeWorld)
Definition qdefs.h:113
#define MAX_DEMOS
max demos provided to demos command
Definition qdefs.h:118
#define CL_MAX_USERCMDS
max number of predicted input packets in queue
Definition qdefs.h:115
#define MAX_MODELS
max number of models loaded at once (including during level transitions)
Definition qdefs.h:106
#define MAX_CL_STATS
Definition qstats.h:7
float vec_t
Definition qtypes.h:68
vec_t vec3_t[3]
Definition qtypes.h:71
bool qbool
Definition qtypes.h:9
#define Q3WAVEFUNC_USER_COUNT
Definition r_qshader.h:42
@ r_stat_count
Definition r_stats.h:167
dp_FragColor b
vec3_t end
Definition client.h:93
int lightning
Definition client.h:90
float endtime
Definition client.h:92
int entity
Definition client.h:88
struct model_s * model
Definition client.h:91
struct prvm_edict_s * self
Definition client.h:1335
waterlevel_t waterlevel
Definition client.h:1349
float framerate
Definition client.h:75
double starttime
Definition client.h:74
double frame2time
Definition client.h:82
double frame1time
Definition client.h:81
vec3_t origin
Definition client.h:73
int active
Definition client.h:72
int frame
Definition client.h:80
int startframe
Definition client.h:77
int endframe
Definition client.h:78
model_t * model
Definition client.h:76
char * name
Definition client.h:724
struct cl_locnode_s * next
Definition client.h:723
vec3_t maxs
Definition client.h:725
int latency_milliseconds
Definition client.h:558
float movevars_warsowbunny_airforwardaccel
Definition client.h:1081
float movevars_stopspeed
Definition client.h:1060
vec3_t csqc_viewanglesfromengine
Definition client.h:1114
float movevars_timescale
Definition client.h:1058
vec3_t movement_origin
Definition client.h:809
float deathfade
Definition client.h:879
float movevars_maxairstrafespeed
Definition client.h:1076
int loadsound_total
Definition client.h:1024
double oldtime
Definition client.h:868
int realplayerentity
Definition client.h:905
float movevars_entgravity
Definition client.h:1066
int max_showlmps
Definition client.h:989
lightstyle_t * lightstyle
Definition client.h:998
float idealpitch
Definition client.h:826
float movevars_waterfriction
Definition client.h:1056
vec3_t qw_intermission_origin
Definition client.h:1095
vec3_t movement_velocity
Definition client.h:810
float movevars_ticrate
Definition client.h:1086
int max_static_entities
Definition client.h:982
int parsingtextexpectingpingforscores
Definition client.h:955
int parsingtextplayerindex
Definition client.h:949
double decals_updatetime
Definition client.h:1014
float movevars_jumpvelocity
Definition client.h:1067
float faceanimtime
Definition client.h:769
int downloadmodel_current
Definition client.h:1020
entity_t viewent
Definition client.h:937
qbool onground
Definition client.h:843
float movevars_warsowbunny_accel
Definition client.h:1082
float movevars_spectatormaxspeed
Definition client.h:1062
int max_lightstyle
Definition client.h:986
float pitchvel
Definition client.h:827
float last_received_message
Definition client.h:885
qbool downloadcsqc
Definition client.h:1025
qbool csqc_usecsqclistener
Definition client.h:1116
int loadmodel_total
Definition client.h:1021
qbool foundteamchatsound
Definition client.h:929
vec3_t lastdeathorigin
Definition client.h:1128
vec3_t playerstandmins
Definition client.h:972
qbool loadfinished
Definition client.h:1028
int num_brushmodel_entities
Definition client.h:1005
float sensitivityscale
Definition client.h:833
cl_locnode_t * locnodes
Definition client.h:1125
unsigned char * entities_active
Definition client.h:993
beam_t * beams
Definition client.h:996
qbool nodrift
Definition client.h:828
size_t csqc_printtextbuf_len
strlen
Definition client.h:1119
float movevars_aircontrol
Definition client.h:1078
float movevars_airaccel_qw_stretchfactor
Definition client.h:1072
uint8_t opt_inputs_since_update
Definition client.h:1051
size_t buildlightmapmemorysize
Definition client.h:1132
sfx_t * sfx_r_exp3
Definition client.h:927
int max_csqcrenderentities
Definition client.h:981
model_t * model_beam
Definition client.h:920
double stairsmoothtime
Definition client.h:772
int max_brushmodel_entities
Definition client.h:987
qbool movement_replay_canjump
Definition client.h:812
int qw_modelindex_flag
Definition client.h:1092
float weapontime
Definition client.h:767
vec3_t gunangles_prev
Definition client.h:815
double hitgroundtime
Definition client.h:849
sfx_t * sfx_tink1
Definition client.h:923
unsigned int decalsequence
Definition client.h:978
particle_t * particles
Definition client.h:1000
scoreboard_t * scores
Definition client.h:945
int loadsound_current
Definition client.h:1022
unsigned char ts_error_num
Definition client.h:875
int qw_servercount
Definition client.h:1039
int qw_modelindex_s_explod
Definition client.h:1093
vec3_t csqc_vieworiginfromengine
Definition client.h:1113
float sendnoptime
Definition client.h:749
double completed_time
Definition client.h:858
qbool paused
Definition client.h:842
float movevars_airaccel_qw
Definition client.h:1071
sfx_t * sfx_ric3
Definition client.h:926
float movevars_warsowbunny_topspeed
Definition client.h:1083
unsigned char * buildlightmapmemory
Definition client.h:1133
float movevars_gravity
Definition client.h:1059
double calcrefdef_prevtime
Definition client.h:853
vec3_t playerstandmaxs
Definition client.h:973
double last_ping_request
Definition client.h:1036
int latestframenumsposition
Definition client.h:960
vec3_t gunorg_prev
Definition client.h:820
float movevars_airspeedlimit_nonqw
Definition client.h:1087
float movevars_airstrafeaccelerate
Definition client.h:1075
model_t * model_bolt3
Definition client.h:919
double lastongroundtime
Definition client.h:848
qbool loadbegun
Definition client.h:1027
entityframeqw_database_t * entitydatabaseqw
Definition client.h:965
int * brushmodel_entities
Definition client.h:999
int activeweapon
Definition client.h:765
float * statsf
Definition client.h:759
sfx_t * sfx_ric1
Definition client.h:924
entity_t * entities
Definition client.h:991
vec3_t playercrouchmaxs
Definition client.h:975
struct model_s * worldmodel
Definition client.h:934
int intermission
Definition client.h:856
model_t * model_bolt2
Definition client.h:918
int lastquakeentity
Definition client.h:968
sfx_t * sfx_wizhit
Definition client.h:921
world_t world
Definition client.h:1122
cl_effect_t * effects
Definition client.h:995
float movevars_maxairspeed
Definition client.h:1069
int qw_modelindex_spike
Definition client.h:1090
qbool csqc_wantsmousemove
Definition client.h:835
float movevars_warsowbunny_turnaccel
Definition client.h:1084
float movevars_accelerate
Definition client.h:1063
matrix4x4_t csqc_viewmodelmatrixfromengine
Definition client.h:1115
qbool loadcsqc
Definition client.h:1026
double realframetime
Definition client.h:871
float movevars_aircontrol_power
Definition client.h:1079
float movevars_maxspeed
Definition client.h:1061
skeleton_t * engineskeletonobjects
Definition client.h:1136
int islocalgame
Definition client.h:746
sfx_t * sfx_knighthit
Definition client.h:922
int free_particle
Definition client.h:1015
float movevars_airaccel_sideways_friction
Definition client.h:1073
qbool view_underwater
Definition client.h:1139
qbool inwater
Definition client.h:844
float movevars_edgefriction
Definition client.h:1068
vec3_t playercrouchmins
Definition client.h:974
int qw_modelindex_player
Definition client.h:1091
int max_effects
Definition client.h:983
int num_particles
Definition client.h:1009
float movevars_warsowbunny_backtosideratio
Definition client.h:1085
int max_dlights
Definition client.h:985
showlmp_t * showlmps
Definition client.h:1001
vec3_t gunangles_highpass
Definition client.h:816
int max_entities
Definition client.h:980
float movevars_friction
Definition client.h:1057
qbool oldonground
Definition client.h:847
double particles_updatetime
Definition client.h:1013
sfx_t * sfx_ric2
Definition client.h:925
float motionbluralpha
Definition client.h:882
entity_render_t * csqcrenderentities
Definition client.h:992
unsigned int moveflags
Definition client.h:1054
vec3_t csqc_viewangles
Definition client.h:1112
qbool movement_predicted
Definition client.h:805
entity_t * static_entities
Definition client.h:994
float movevars_aircontrol_penalty
Definition client.h:1080
vec3_t gunangles_adjustment_lowpass
Definition client.h:817
int max_particles
Definition client.h:988
model_t * model_bolt
Definition client.h:917
float movevars_airaccelerate
Definition client.h:1064
float movevars_stepheight
Definition client.h:1070
int playerentity
Definition client.h:910
cl_parsingtextmode_t parsingtextmode
Definition client.h:948
unsigned int qw_validsequence
Definition client.h:1104
float bob2_smooth
Definition client.h:850
entityframe_database_t * entitydatabase
Definition client.h:963
qbool movement_replay
Definition client.h:807
vec3_t qw_intermission_angles
Definition client.h:1096
int downloadsound_current
Definition client.h:1023
vec3_t gunorg_highpass
Definition client.h:821
usercmd_t cmd
Definition client.h:752
float driftmove
Definition client.h:829
double laststop
Definition client.h:830
vec3_t gunorg_adjustment_lowpass
Definition client.h:822
csqc_vidvars_t csqc_vidvars
Definition client.h:834
vec3_t gunangles_adjustment_highpass
Definition client.h:818
dlight_t * dlights
Definition client.h:997
float bobfall_swing
Definition client.h:852
int num_static_entities
Definition client.h:1004
float movevars_wateraccelerate
Definition client.h:1065
float stairsmoothz
Definition client.h:771
matrix4x4_t csqc_listenermatrix
Definition client.h:1117
float movevars_airstrafeaccel_qw
Definition client.h:1077
float movevars_airstopaccelerate
Definition client.h:1074
int loadmodel_current
Definition client.h:1019
float bobfall_speed
Definition client.h:851
float timesincepacket
Definition client.h:1049
float movevars_wallfriction
Definition client.h:1055
float qw_weaponkick
Definition client.h:1102
entityframe4_database_t * entitydatabase4
Definition client.h:964
vec3_t csqc_vieworigin
Definition client.h:1111
vec3_t gunorg_adjustment_highpass
Definition client.h:823
double td_onesecondframes
Definition client.h:597
unsigned char * caughtcsprogsdata
Definition client.h:688
unsigned int servermovesequence
Definition client.h:637
qbool demoplayback
Definition client.h:587
mempool_t * permanentmempool
Definition client.h:572
int qw_downloadnumber
Definition client.h:652
int r_speeds_graph_length
Definition client.h:691
int qw_downloadpercent
Definition client.h:653
qbool connect_trying
Definition client.h:609
cl_soundstats_t soundstats
Definition client.h:607
int demo_lastcsprogscrc
Definition client.h:586
qbool demopaused
Definition client.h:604
int * r_speeds_graph_data
Definition client.h:693
qbool timedemo
Definition client.h:589
qfile_t * demofile
Definition client.h:592
int connect_remainingtries
Definition client.h:610
double td_onesecondavgfps
Definition client.h:601
double td_onesecondrealtime
Definition client.h:598
int qw_downloadspeedcount
Definition client.h:657
int proquake_serverflags
Definition client.h:685
double td_onesecondmaxfps
Definition client.h:600
int td_onesecondavgcount
Definition client.h:602
int proquake_serverversion
Definition client.h:684
double td_starttime
Definition client.h:594
unsigned char * qw_downloadmemory
Definition client.h:649
cactive_t state
Definition client.h:568
crypto_t crypto
Definition client.h:680
qbool qw_download_deflate
Definition client.h:659
int qw_downloadspeedrate
Definition client.h:658
fs_offset_t demo_lastcsprogssize
Definition client.h:585
qbool demorecording
Definition client.h:584
unsigned int qw_outgoing_sequence
Definition client.h:645
unsigned int qw_incoming_sequence
Definition client.h:644
fs_offset_t caughtcsprogsdatasize
Definition client.h:689
double td_onesecondnexttime
Definition client.h:596
int r_speeds_graph_current
Definition client.h:692
int qw_downloadmemorymaxsize
Definition client.h:651
netconn_t * netcon
Definition client.h:630
qbool demostarting
Definition client.h:588
lhnetaddress_t rcon_address
Definition client.h:614
int proquake_servermod
Definition client.h:683
double connect_nextsendtime
Definition client.h:611
int qw_uploadsize
Definition client.h:663
lhnetaddress_t connect_address
Definition client.h:613
lhnetsocket_t * connect_mysocket
Definition client.h:612
mempool_t * levelmempool
Definition client.h:571
int qw_downloadmemorycursize
Definition client.h:650
double qw_downloadspeedtime
Definition client.h:656
protocolversion_t protocol
Definition client.h:617
qw_downloadtype_t qw_downloadtype
Definition client.h:654
unsigned char * qw_uploaddata
Definition client.h:662
double td_onesecondminfps
Definition client.h:599
command interpreter state - the tokenizing and execution of commands, as well as pointers to which cv...
Definition cmd.h:127
float percent
Definition client.h:507
float alphafade
Definition client.h:508
qbool drawenginesbar
Definition client.h:707
qbool drawworld
Definition client.h:706
qbool drawcrosshair
Definition client.h:708
Definition cvar.h:66
model_t * model
Definition client.h:57
int maxdecals
Definition client.h:59
int * element3i
Definition client.h:65
tridecal_t * decals
Definition client.h:61
double lastupdatetime
Definition client.h:58
int numdecals
Definition client.h:60
unsigned short * element3s
Definition client.h:66
float * color4f
Definition client.h:64
float * texcoord2f
Definition client.h:63
float * vertex3f
Definition client.h:62
vec3_t angles
Definition client.h:246
vec_t decay
Definition client.h:264
struct entity_render_s * ent
Definition client.h:239
int flags
Definition client.h:295
vec_t coronasizescale
Definition client.h:283
rtlight_t rtlight
Definition client.h:301
matrix4x4_t matrix
Definition client.h:249
vec3_t origin
Definition client.h:242
int style
Definition client.h:274
vec_t corona
Definition client.h:280
int shadow
Definition client.h:277
vec3_t color
Definition client.h:252
vec3_t initialcolor
Definition client.h:271
vec_t die
Definition client.h:236
vec_t ambientscale
Definition client.h:286
struct dlight_s * next
Definition client.h:298
vec_t diffusescale
Definition client.h:289
vec_t initialradius
Definition client.h:270
vec_t specularscale
Definition client.h:292
vec_t intensity
Definition client.h:267
vec_t radius
Definition client.h:261
int selected
Definition client.h:258
vec3_t trail_origin
Definition client.h:451
vec3_t custommodellight_lightdir
Definition client.h:404
float * animcache_skeletaltransform3x4
Definition client.h:395
matrix4x4_t inversematrix
Definition client.h:334
r_meshbuffer_t * animcache_vertex3f_vertexbuffer
Definition client.h:380
matrix4x4_t matrix
Definition client.h:332
float * animcache_normal3f
Definition client.h:382
int animcache_skeletaltransform3x4size
Definition client.h:398
qbool render_rtlight_disabled
Definition client.h:431
int animcache_vertex3f_bufferoffset
Definition client.h:381
r_meshbuffer_t * animcache_svector3f_vertexbuffer
Definition client.h:386
model_t * model
Definition client.h:343
vec3_t custommodellight_diffuse
Definition client.h:403
decalsystem_t decalsystem
Definition client.h:438
vec3_t colormap_shirtcolor
Definition client.h:348
r_meshbuffer_t * animcache_tvector3f_vertexbuffer
Definition client.h:389
qbool render_modellight_forced
Definition client.h:429
float transparent_offset
Definition client.h:340
double last_trace_visibility
Definition client.h:442
vec3_t custommodellight_ambient
Definition client.h:402
double shadertime
Definition client.h:366
float * animcache_vertex3f
Definition client.h:379
int animcache_svector3f_bufferoffset
Definition client.h:387
int internaleffects
Definition client.h:352
r_meshbuffer_t * animcache_skeletaltransform3x4buffer
Definition client.h:396
r_meshbuffer_t * animcache_normal3f_vertexbuffer
Definition client.h:383
qbool render_lightgrid
Definition client.h:433
float * animcache_svector3f
Definition client.h:385
int animcache_tvector3f_bufferoffset
Definition client.h:390
float * animcache_tvector3f
Definition client.h:388
vec3_t colormap_pantscolor
Definition client.h:347
int animcache_skeletaltransform3x4offset
Definition client.h:397
vec3_t maxs
Definition client.h:371
skeleton_t * skeleton
Definition client.h:375
int animcache_normal3f_bufferoffset
Definition client.h:384
entity_state_t state_baseline
Definition client.h:467
entity_persistent_t persistent
Definition client.h:474
entity_state_t state_current
Definition client.h:471
entity_state_t state_previous
Definition client.h:469
entity_render_t render
Definition client.h:477
float lerp
Definition client.h:313
int subframe
Definition client.h:312
int state
Definition client.h:1246
int particlecache_updateparticle
Definition client.h:220
vec_t ambientscale
ambient intensity to render
Definition client.h:128
rtexture_t * currentcubemap
this is R_GetCubemap(rtlight->cubemapname)
Definition client.h:153
vec3_t currentcolor
Definition client.h:147
struct entity_render_s ** cached_lightentities_noselfshadow
Definition client.h:165
vec3_t cached_cullmins
Definition client.h:172
float corona_visibility
used by corona updates, due to occlusion query
Definition client.h:149
unsigned char * static_shadowtrispvs
Definition client.h:208
int shadowmapatlassidesize
size of one side of this light in the shadowmap atlas (for omnidirectional shadowmaps this is the min...
Definition client.h:190
int shadow
whether light should render shadows (see castshadows for whether it actually does this frame)
Definition client.h:122
int static_shadowmap_receivers
masks of all shadowmap sides that have any potential static receivers or casters
Definition client.h:215
int particlecache_numparticles
particle-tracing cache for global illumination
Definition client.h:218
int cached_numlightentities
these fields are set by R_Shadow_PrepareLight for later drawing
Definition client.h:159
int bouncegrid_traces
Definition client.h:227
unsigned char * static_leafpvs
Definition client.h:197
vec3_t color
typically 1 1 1, can be lower (dim) or higher (overbright)
Definition client.h:114
int static_shadowmap_casters
Definition client.h:216
double trace_timer
when r_shadow_culllights_trace is set, this is refreshed by each successful trace.
Definition client.h:143
unsigned char * cached_shadowtrispvs
Definition client.h:168
vec_t corona
intensity of corona to render
Definition client.h:124
int static_numleafpvsbytes
Definition client.h:195
vec_t specularscale
specular intensity to render
Definition client.h:132
unsigned int corona_queryindex_visiblepixels
Definition client.h:150
int particlecache_maxparticles
Definition client.h:219
int cached_numlightentities_noselfshadow
Definition client.h:160
vec3_t cullmins
culling
Definition client.h:140
int flags
LIGHTFLAG_* flags.
Definition client.h:134
int compiled
true if this is a compiled world light, cleared if the light changes
Definition client.h:184
unsigned char * static_lighttrispvs
Definition client.h:213
int cached_numshadowentities
Definition client.h:161
int style
light style to monitor for brightness
Definition client.h:120
qbool draw
set by R_Shadow_PrepareLight to decide whether R_Shadow_DrawLight should draw it
Definition client.h:155
shadowmesh_t * static_meshchain_shadow_shadowmap
optimized and culled mesh to render for world entity shadows
Definition client.h:192
int cached_numfrustumplanes
Definition client.h:177
vec3_t shadoworigin
used only for casting shadows
Definition client.h:138
float bouncegrid_effectiveradius
Definition client.h:228
int isstatic
static light info true if this light should be compiled as a static light
Definition client.h:182
int static_numlighttrispvsbytes
this allows the lighting batch code to skip backfaces andother culled triangles not relevant for ligh...
Definition client.h:212
vec_t coronasizescale
radius scale of corona to render (1.0 means same as light radius)
Definition client.h:126
int * static_leaflist
Definition client.h:196
int static_numsurfaces
surfaces seen by light
Definition client.h:199
int shadowmapsidesize
the size that this light should have (assuming no scene LOD kicking in to reduce it)
Definition client.h:186
matrix4x4_t matrix_lighttoworld
matrix for transforming light filter coordinates to world coordinates
Definition client.h:110
int cached_numsurfaces
Definition client.h:163
vec3_t cullmaxs
Definition client.h:141
struct entity_render_s ** cached_shadowentities_noselfshadow
Definition client.h:167
matrix4x4_t matrix_worldtolight
matrix for transforming world coordinates to light filter coordinates
Definition client.h:112
int static_numshadowtrispvsbytes
flag bits indicating which triangles of the world model should cast shadows, and which ones should be...
Definition client.h:207
int bouncegrid_hits
Definition client.h:226
float bouncegrid_photons
Definition client.h:225
vec_t diffusescale
diffuse intensity to render
Definition client.h:130
struct entity_render_s ** cached_lightentities
Definition client.h:164
int static_numleafs
used for visibility testing (more exact than bbox)
Definition client.h:194
int cached_numshadowentities_noselfshadow
Definition client.h:162
int * cached_surfacelist
Definition client.h:170
unsigned char * cached_lighttrispvs
Definition client.h:169
qbool castshadows
set by R_Shadow_PrepareLight to indicate whether R_Shadow_DrawShadowMaps should do anything
Definition client.h:157
vec_t radius
size of the light (remove?)
Definition client.h:116
int * static_surfacelist
Definition client.h:200
rtlight_particle_t * particlecache_particles
Definition client.h:221
struct entity_render_s ** cached_shadowentities
Definition client.h:166
unsigned int corona_queryindex_allpixels
Definition client.h:151
vec3_t cached_cullmaxs
Definition client.h:173
int qw_movementloss
Definition client.h:498
int qw_packetloss
Definition client.h:497
int qw_ping
Definition client.h:496
float qw_entertime
Definition client.h:495
int qw_userid
Definition client.h:493
int qw_spectator
Definition client.h:499
qbool isactive
Definition client.h:731
float x
Definition client.h:732
float y
Definition client.h:733
int surfaceindex
Definition client.h:49
float lived
Definition client.h:45
int triangleindex
Definition client.h:47
unsigned int decalsequence
Definition client.h:51