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