vkQuake2 doxygen  1.0 dev
cl_parse.c File Reference
#include "client.h"

Go to the source code of this file.

Functions

void CL_DownloadFileName (char *dest, int destlen, char *fn)
 
qboolean CL_CheckOrDownloadFile (char *filename)
 
void CL_Download_f (void)
 
void CL_RegisterSounds (void)
 
void CL_ParseDownload (void)
 
void CL_ParseServerData (void)
 
void CL_ParseBaseline (void)
 
void CL_LoadClientinfo (clientinfo_t *ci, char *s)
 
void CL_ParseClientinfo (int player)
 
void CL_ParseConfigString (void)
 
void CL_ParseStartSoundPacket (void)
 
void SHOWNET (char *s)
 
void CL_ParseServerMessage (void)
 

Variables

char * svc_strings [256]
 

Function Documentation

◆ CL_CheckOrDownloadFile()

qboolean CL_CheckOrDownloadFile ( char *  filename)

Definition at line 69 of file cl_parse.c.

70 {
71  FILE *fp;
72  char name[MAX_OSPATH];
73 
74  if (strstr (filename, ".."))
75  {
76  Com_Printf ("Refusing to download a path with ..\n");
77  return true;
78  }
79 
80  if (FS_LoadFile (filename, NULL) != -1)
81  { // it exists, no need to download
82  return true;
83  }
84 
85  strcpy (cls.downloadname, filename);
86 
87  // download to a temp name, and only rename
88  // to the real name when done, so if interrupted
89  // a runt file wont be left
91  strcat (cls.downloadtempname, ".tmp");
92 
93 //ZOID
94  // check to see if we already have a tmp for this file, if so, try to resume
95  // open the file if not opened yet
97 
98 // FS_CreatePath (name);
99 
100  fp = fopen (name, "r+b");
101  if (fp) { // it exists
102  int len;
103  fseek(fp, 0, SEEK_END);
104  len = ftell(fp);
105 
106  cls.download = fp;
107 
108  // give the server an offset to start the download
109  Com_Printf ("Resuming %s\n", cls.downloadname);
112  va("download %s %i", cls.downloadname, len));
113  } else {
114  Com_Printf ("Downloading %s\n", cls.downloadname);
117  va("download %s", cls.downloadname));
118  }
119 
121 
122  return false;
123 }

Referenced by CL_RequestNextDownload().

◆ CL_Download_f()

void CL_Download_f ( void  )

Definition at line 132 of file cl_parse.c.

133 {
134  char filename[MAX_OSPATH];
135 
136  if (Cmd_Argc() != 2) {
137  Com_Printf("Usage: download <filename>\n");
138  return;
139  }
140 
141  Com_sprintf(filename, sizeof(filename), "%s", Cmd_Argv(1));
142 
143  if (strstr (filename, ".."))
144  {
145  Com_Printf ("Refusing to download a path with ..\n");
146  return;
147  }
148 
149  if (FS_LoadFile (filename, NULL) != -1)
150  { // it exists, no need to download
151  Com_Printf("File already exists.\n");
152  return;
153  }
154 
155  strcpy (cls.downloadname, filename);
156  Com_Printf ("Downloading %s\n", cls.downloadname);
157 
158  // download to a temp name, and only rename
159  // to the real name when done, so if interrupted
160  // a runt file wont be left
162  strcat (cls.downloadtempname, ".tmp");
163 
166  va("download %s", cls.downloadname));
167 
169 }

Referenced by CL_InitLocal().

◆ CL_DownloadFileName()

void CL_DownloadFileName ( char *  dest,
int  destlen,
char *  fn 
)

Definition at line 53 of file cl_parse.c.

54 {
55  if (strncmp(fn, "players", 7) == 0)
56  Com_sprintf (dest, destlen, "%s/%s", BASEDIRNAME, fn);
57  else
58  Com_sprintf (dest, destlen, "%s/%s", FS_Gamedir(), fn);
59 }

Referenced by CL_CheckOrDownloadFile(), and CL_ParseDownload().

◆ CL_LoadClientinfo()

void CL_LoadClientinfo ( clientinfo_t ci,
char *  s 
)

Definition at line 380 of file cl_parse.c.

381 {
382  int i;
383  char *t;
384  char model_name[MAX_QPATH];
385  char skin_name[MAX_QPATH];
386  char model_filename[MAX_QPATH];
387  char skin_filename[MAX_QPATH];
388  char weapon_filename[MAX_QPATH];
389 
390  strncpy(ci->cinfo, s, sizeof(ci->cinfo));
391  ci->cinfo[sizeof(ci->cinfo)-1] = 0;
392 
393  // isolate the player's name
394  strncpy(ci->name, s, sizeof(ci->name));
395  ci->name[sizeof(ci->name)-1] = 0;
396  t = strstr (s, "\\");
397  if (t)
398  {
399  ci->name[t-s] = 0;
400  s = t+1;
401  }
402 
403  if (cl_noskins->value || *s == 0)
404  {
405  Com_sprintf (model_filename, sizeof(model_filename), "players/male/tris.md2");
406  Com_sprintf (weapon_filename, sizeof(weapon_filename), "players/male/weapon.md2");
407  Com_sprintf (skin_filename, sizeof(skin_filename), "players/male/grunt.pcx");
408  Com_sprintf (ci->iconname, sizeof(ci->iconname), "/players/male/grunt_i.pcx");
409  ci->model = re.RegisterModel (model_filename);
410  memset(ci->weaponmodel, 0, sizeof(ci->weaponmodel));
411  ci->weaponmodel[0] = re.RegisterModel (weapon_filename);
412  ci->skin = re.RegisterSkin (skin_filename);
413  ci->icon = re.RegisterPic (ci->iconname);
414  }
415  else
416  {
417  // isolate the model name
418  strcpy (model_name, s);
419  t = strstr(model_name, "/");
420  if (!t)
421  t = strstr(model_name, "\\");
422  if (!t)
423  t = model_name;
424  *t = 0;
425 
426  // isolate the skin name
427  strcpy (skin_name, s + strlen(model_name) + 1);
428 
429  // model file
430  Com_sprintf (model_filename, sizeof(model_filename), "players/%s/tris.md2", model_name);
431  ci->model = re.RegisterModel (model_filename);
432  if (!ci->model)
433  {
434  strcpy(model_name, "male");
435  Com_sprintf (model_filename, sizeof(model_filename), "players/male/tris.md2");
436  ci->model = re.RegisterModel (model_filename);
437  }
438 
439  // skin file
440  Com_sprintf (skin_filename, sizeof(skin_filename), "players/%s/%s.pcx", model_name, skin_name);
441  ci->skin = re.RegisterSkin (skin_filename);
442 
443  // if we don't have the skin and the model wasn't male,
444  // see if the male has it (this is for CTF's skins)
445  if (!ci->skin && Q_stricmp(model_name, "male"))
446  {
447  // change model to male
448  strcpy(model_name, "male");
449  Com_sprintf (model_filename, sizeof(model_filename), "players/male/tris.md2");
450  ci->model = re.RegisterModel (model_filename);
451 
452  // see if the skin exists for the male model
453  Com_sprintf (skin_filename, sizeof(skin_filename), "players/%s/%s.pcx", model_name, skin_name);
454  ci->skin = re.RegisterSkin (skin_filename);
455  }
456 
457  // if we still don't have a skin, it means that the male model didn't have
458  // it, so default to grunt
459  if (!ci->skin) {
460  // see if the skin exists for the male model
461  Com_sprintf (skin_filename, sizeof(skin_filename), "players/%s/grunt.pcx", model_name, skin_name);
462  ci->skin = re.RegisterSkin (skin_filename);
463  }
464 
465  // weapon file
466  for (i = 0; i < num_cl_weaponmodels; i++) {
467  Com_sprintf (weapon_filename, sizeof(weapon_filename), "players/%s/%s", model_name, cl_weaponmodels[i]);
468  ci->weaponmodel[i] = re.RegisterModel(weapon_filename);
469  if (!ci->weaponmodel[i] && strcmp(model_name, "cyborg") == 0) {
470  // try male
471  Com_sprintf (weapon_filename, sizeof(weapon_filename), "players/male/%s", cl_weaponmodels[i]);
472  ci->weaponmodel[i] = re.RegisterModel(weapon_filename);
473  }
474  if (!cl_vwep->value)
475  break; // only one when vwep is off
476  }
477 
478  // icon file
479  Com_sprintf (ci->iconname, sizeof(ci->iconname), "/players/%s/%s_i.pcx", model_name, skin_name);
480  ci->icon = re.RegisterPic (ci->iconname);
481  }
482 
483  // must have loaded all data types to be valud
484  if (!ci->skin || !ci->icon || !ci->model || !ci->weaponmodel[0])
485  {
486  ci->skin = NULL;
487  ci->icon = NULL;
488  ci->model = NULL;
489  ci->weaponmodel[0] = NULL;
490  return;
491  }
492 }

Referenced by CL_ParseClientinfo(), and CL_PrepRefresh().

◆ CL_ParseBaseline()

void CL_ParseBaseline ( void  )

Definition at line 359 of file cl_parse.c.

360 {
361  entity_state_t *es;
362  int bits;
363  int newnum;
364  entity_state_t nullstate;
365 
366  memset (&nullstate, 0, sizeof(nullstate));
367 
368  newnum = CL_ParseEntityBits (&bits);
369  es = &cl_entities[newnum].baseline;
370  CL_ParseDelta (&nullstate, es, newnum, bits);
371 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseClientinfo()

void CL_ParseClientinfo ( int  player)

Definition at line 501 of file cl_parse.c.

502 {
503  char *s;
504  clientinfo_t *ci;
505 
506  s = cl.configstrings[player+CS_PLAYERSKINS];
507 
508  ci = &cl.clientinfo[player];
509 
510  CL_LoadClientinfo (ci, s);
511 }

Referenced by CL_ParseConfigString(), CL_PrepRefresh(), and CL_Skins_f().

◆ CL_ParseConfigString()

void CL_ParseConfigString ( void  )

Definition at line 519 of file cl_parse.c.

520 {
521  int i;
522  char *s;
523  char olds[MAX_QPATH];
524 
526  if (i < 0 || i >= MAX_CONFIGSTRINGS)
527  Com_Error (ERR_DROP, "configstring > MAX_CONFIGSTRINGS");
529 
530  strncpy (olds, cl.configstrings[i], sizeof(olds));
531  olds[sizeof(olds) - 1] = 0;
532 
533  strcpy (cl.configstrings[i], s);
534 
535  // do something apropriate
536 
537  if (i >= CS_LIGHTS && i < CS_LIGHTS+MAX_LIGHTSTYLES)
539  else if (i == CS_CDTRACK)
540  {
541  if (cl.refresh_prepped)
542  {
543  int track = atoi(cl.configstrings[CS_CDTRACK]);
544  if (!CDAudio_Play(track, true))
545  Miniaudio_Play(track, true);
546  }
547  }
548  else if (i >= CS_MODELS && i < CS_MODELS+MAX_MODELS)
549  {
550  if (cl.refresh_prepped)
551  {
553  if (cl.configstrings[i][0] == '*')
555  else
557  }
558  }
559  else if (i >= CS_SOUNDS && i < CS_SOUNDS+MAX_MODELS)
560  {
561  if (cl.refresh_prepped)
563  }
564  else if (i >= CS_IMAGES && i < CS_IMAGES+MAX_MODELS)
565  {
566  if (cl.refresh_prepped)
568  }
569  else if (i >= CS_PLAYERSKINS && i < CS_PLAYERSKINS+MAX_CLIENTS)
570  {
571  if (cl.refresh_prepped && strcmp(olds, s))
573  }
574 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseDownload()

void CL_ParseDownload ( void  )

Definition at line 200 of file cl_parse.c.

201 {
202  int size, percent;
203  char name[MAX_OSPATH];
204  int r;
205 
206  // read the data
207  size = MSG_ReadShort (&net_message);
208  percent = MSG_ReadByte (&net_message);
209  if (size == -1)
210  {
211  Com_Printf ("Server does not have this file.\n");
212  if (cls.download)
213  {
214  // if here, we tried to resume a file but the server said no
215  fclose (cls.download);
216  cls.download = NULL;
217  }
219  return;
220  }
221 
222  // open the file if not opened yet
223  if (!cls.download)
224  {
226 
228 
229  cls.download = fopen (name, "wb");
230  if (!cls.download)
231  {
232  net_message.readcount += size;
233  Com_Printf ("Failed to open %s\n", cls.downloadtempname);
235  return;
236  }
237  }
238 
239  fwrite (net_message.data + net_message.readcount, 1, size, cls.download);
240  net_message.readcount += size;
241 
242  if (percent != 100)
243  {
244  // request next block
245 // change display routines by zoid
246 #if 0
247  Com_Printf (".");
248  if (10*(percent/10) != cls.downloadpercent)
249  {
250  cls.downloadpercent = 10*(percent/10);
251  Com_Printf ("%i%%", cls.downloadpercent);
252  }
253 #endif
254  cls.downloadpercent = percent;
255 
257  SZ_Print (&cls.netchan.message, "nextdl");
258  }
259  else
260  {
261  char oldn[MAX_OSPATH];
262  char newn[MAX_OSPATH];
263 
264 // Com_Printf ("100%%\n");
265 
266  fclose (cls.download);
267 
268  // rename the temp file to it's final name
269  CL_DownloadFileName(oldn, sizeof(oldn), cls.downloadtempname);
270  CL_DownloadFileName(newn, sizeof(newn), cls.downloadname);
271  r = rename (oldn, newn);
272  if (r)
273  Com_Printf ("failed to rename.\n");
274 
275  cls.download = NULL;
276  cls.downloadpercent = 0;
277 
278  // get another file if needed
279 
281  }
282 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseServerData()

void CL_ParseServerData ( void  )

Definition at line 298 of file cl_parse.c.

299 {
300  extern cvar_t *fs_gamedirvar;
301  char *str;
302  int i;
303 
304  Com_DPrintf ("Serverdata packet received.\n");
305 //
306 // wipe the client_state_t struct
307 //
308  CL_ClearState ();
310 
311 // parse protocol version number
313  cls.serverProtocol = i;
314 
315  // BIG HACK to let demos from release work with the 3.0x patch!!!
316  if (Com_ServerState() && PROTOCOL_VERSION == 34)
317  {
318  }
319  else if (i != PROTOCOL_VERSION)
320  Com_Error (ERR_DROP,"Server returned version %i, not %i", i, PROTOCOL_VERSION);
321 
324 
325  // game directory
326  str = MSG_ReadString (&net_message);
327  strncpy (cl.gamedir, str, sizeof(cl.gamedir)-1);
328 
329  // set gamedir
330  if ((*str && (!fs_gamedirvar->string || !*fs_gamedirvar->string || strcmp(fs_gamedirvar->string, str))) || (!*str && (fs_gamedirvar->string || *fs_gamedirvar->string)))
331  Cvar_Set("game", str);
332 
333  // parse player entity number
335 
336  // get the full level name
337  str = MSG_ReadString (&net_message);
338 
339  if (cl.playernum == -1)
340  { // playing a cinematic or showing a pic, not a level
341  SCR_PlayCinematic (str);
342  }
343  else
344  {
345  // seperate the printfs so the server message can have a color
346  Com_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n");
347  Com_Printf ("%c%s\n", 2, str);
348 
349  // need to prep refresh at next oportunity
350  cl.refresh_prepped = false;
351  }
352 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseServerMessage()

void CL_ParseServerMessage ( void  )

Definition at line 661 of file cl_parse.c.

662 {
663  int cmd;
664  char *s;
665  int i;
666 
667 //
668 // if recording demos, copy the message out
669 //
670  if (cl_shownet->value == 1)
672  else if (cl_shownet->value >= 2)
673  Com_Printf ("------------------\n");
674 
675 
676 //
677 // parse the message
678 //
679  while (1)
680  {
682  {
683  Com_Error (ERR_DROP,"CL_ParseServerMessage: Bad server message");
684  break;
685  }
686 
687  cmd = MSG_ReadByte (&net_message);
688 
689  if (cmd == -1)
690  {
691  SHOWNET("END OF MESSAGE");
692  break;
693  }
694 
695  if (cl_shownet->value>=2)
696  {
697  if (!svc_strings[cmd])
698  Com_Printf ("%3i:BAD CMD %i\n", net_message.readcount-1,cmd);
699  else
700  SHOWNET(svc_strings[cmd]);
701  }
702 
703  // other commands
704  switch (cmd)
705  {
706  default:
707  Com_Error (ERR_DROP,"CL_ParseServerMessage: Illegible server message\n");
708  break;
709 
710  case svc_nop:
711 // Com_Printf ("svc_nop\n");
712  break;
713 
714  case svc_disconnect:
715  Com_Error (ERR_DISCONNECT,"Server disconnected\n");
716  break;
717 
718  case svc_reconnect:
719  Com_Printf ("Server disconnected, reconnecting\n");
720  if (cls.download) {
721  //ZOID, close download
722  fclose (cls.download);
723  cls.download = NULL;
724  }
726  cls.connect_time = -99999; // CL_CheckForResend() will fire immediately
727  break;
728 
729  case svc_print:
731  if (i == PRINT_CHAT)
732  {
733  S_StartLocalSound ("misc/talk.wav");
734  con.ormask = 128;
735  }
737  con.ormask = 0;
738  break;
739 
740  case svc_centerprint:
742  break;
743 
744  case svc_stufftext:
746  Com_DPrintf ("stufftext: %s\n", s);
747  Cbuf_AddText (s);
748  break;
749 
750  case svc_serverdata:
751  Cbuf_Execute (); // make sure any stuffed commands are done
753  break;
754 
755  case svc_configstring:
757  break;
758 
759  case svc_sound:
761  break;
762 
763  case svc_spawnbaseline:
764  CL_ParseBaseline ();
765  break;
766 
767  case svc_temp_entity:
768  CL_ParseTEnt ();
769  break;
770 
771  case svc_muzzleflash:
773  break;
774 
775  case svc_muzzleflash2:
777  break;
778 
779  case svc_download:
780  CL_ParseDownload ();
781  break;
782 
783  case svc_frame:
784  CL_ParseFrame ();
785  break;
786 
787  case svc_inventory:
789  break;
790 
791  case svc_layout:
793  strncpy (cl.layout, s, sizeof(cl.layout)-1);
794  break;
795 
796  case svc_playerinfo:
797  case svc_packetentities:
799  Com_Error (ERR_DROP, "Out of place frame data");
800  break;
801  }
802  }
803 
804  CL_AddNetgraph ();
805 
806  //
807  // we don't know if it is ok to save a demo message until
808  // after we have parsed the frame
809  //
812 
813 }

Referenced by CL_ReadPackets().

◆ CL_ParseStartSoundPacket()

void CL_ParseStartSoundPacket ( void  )

Definition at line 590 of file cl_parse.c.

591 {
592  vec3_t pos_v;
593  float *pos;
594  int channel, ent;
595  int sound_num;
596  float volume;
597  float attenuation;
598  int flags;
599  float ofs;
600 
602  sound_num = MSG_ReadByte (&net_message);
603 
604  if (flags & SND_VOLUME)
605  volume = MSG_ReadByte (&net_message) / 255.0;
606  else
608 
609  if (flags & SND_ATTENUATION)
610  attenuation = MSG_ReadByte (&net_message) / 64.0;
611  else
612  attenuation = DEFAULT_SOUND_PACKET_ATTENUATION;
613 
614  if (flags & SND_OFFSET)
615  ofs = MSG_ReadByte (&net_message) / 1000.0;
616  else
617  ofs = 0;
618 
619  if (flags & SND_ENT)
620  { // entity reletive
622  ent = channel>>3;
623  if (ent > MAX_EDICTS)
624  Com_Error (ERR_DROP,"CL_ParseStartSoundPacket: ent = %i", ent);
625 
626  channel &= 7;
627  }
628  else
629  {
630  ent = 0;
631  channel = 0;
632  }
633 
634  if (flags & SND_POS)
635  { // positioned in space
636  MSG_ReadPos (&net_message, pos_v);
637 
638  pos = pos_v;
639  }
640  else // use entity number
641  pos = NULL;
642 
643  if (!cl.sound_precache[sound_num])
644  return;
645 
646  S_StartSound (pos, ent, channel, cl.sound_precache[sound_num], volume, attenuation, ofs);
647 }

Referenced by CL_ParseServerMessage().

◆ CL_RegisterSounds()

void CL_RegisterSounds ( void  )

Definition at line 176 of file cl_parse.c.

177 {
178  int i;
179 
182  for (i=1 ; i<MAX_SOUNDS ; i++)
183  {
184  if (!cl.configstrings[CS_SOUNDS+i][0])
185  break;
187  Sys_SendKeyEvents (); // pump message loop
188  }
190 }

Referenced by CL_Precache_f(), CL_RequestNextDownload(), and CL_Snd_Restart_f().

◆ SHOWNET()

void SHOWNET ( char *  s)

Definition at line 650 of file cl_parse.c.

651 {
652  if (cl_shownet->value>=2)
653  Com_Printf ("%3i:%s\n", net_message.readcount-1, s);
654 }

Referenced by CL_ParseFrame(), and CL_ParseServerMessage().

Variable Documentation

◆ svc_strings

char* svc_strings[256]
Initial value:
=
{
"svc_bad",
"svc_muzzleflash",
"svc_muzzlflash2",
"svc_temp_entity",
"svc_layout",
"svc_inventory",
"svc_nop",
"svc_disconnect",
"svc_reconnect",
"svc_sound",
"svc_print",
"svc_stufftext",
"svc_serverdata",
"svc_configstring",
"svc_spawnbaseline",
"svc_centerprint",
"svc_download",
"svc_playerinfo",
"svc_packetentities",
"svc_deltapacketentities",
"svc_frame"
}

Definition at line 24 of file cl_parse.c.

Referenced by CL_ParseFrame(), and CL_ParseServerMessage().

refexport_t::RegisterSkin
struct image_s *(* RegisterSkin)(char *name)
Definition: ref.h:159
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:86
svc_nop
@ svc_nop
Definition: qcommon.h:232
svc_centerprint
@ svc_centerprint
Definition: qcommon.h:241
client_state_t::servercount
int servercount
Definition: client.h:154
SND_POS
#define SND_POS
Definition: qcommon.h:303
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:80
CL_ParseInventory
void CL_ParseInventory(void)
Definition: cl_inv.c:31
MAX_MODELS
#define MAX_MODELS
Definition: q_shared.h:89
SND_OFFSET
#define SND_OFFSET
Definition: qcommon.h:305
CS_SOUNDS
#define CS_SOUNDS
Definition: q_shared.h:1113
CL_ParseClientinfo
void CL_ParseClientinfo(int player)
Definition: cl_parse.c:501
client_state_t::attractloop
qboolean attractloop
Definition: client.h:153
svc_muzzleflash
@ svc_muzzleflash
Definition: qcommon.h:225
svc_frame
@ svc_frame
Definition: qcommon.h:246
CL_WriteDemoMessage
void CL_WriteDemoMessage(void)
Definition: cl_main.c:115
MSG_ReadShort
int MSG_ReadShort(sizebuf_t *msg_read)
Definition: common.c:716
num_cl_weaponmodels
int num_cl_weaponmodels
Definition: cl_view.c:56
net_message
sizebuf_t net_message
Definition: net_chan.c:82
entity_state_s
Definition: q_shared.h:1145
cl_shownet
cvar_t * cl_shownet
Definition: cl_main.c:56
netchan_t::message
sizebuf_t message
Definition: qcommon.h:608
CL_ParseDownload
void CL_ParseDownload(void)
Definition: cl_parse.c:200
ca_connecting
@ ca_connecting
Definition: client.h:187
model_s::flags
int flags
Definition: r_model.h:180
CS_CDTRACK
#define CS_CDTRACK
Definition: q_shared.h:1102
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:160
BASEDIRNAME
#define BASEDIRNAME
Definition: qcommon.h:28
svc_inventory
@ svc_inventory
Definition: qcommon.h:229
CL_ParseEntityBits
int CL_ParseEntityBits(unsigned *bits)
just for protocol profiling
Definition: cl_ents.c:202
Miniaudio_Play
void Miniaudio_Play(int track, qboolean looping)
Definition: snd_miniaudio.c:225
DEFAULT_SOUND_PACKET_VOLUME
#define DEFAULT_SOUND_PACKET_VOLUME
Definition: qcommon.h:307
COM_StripExtension
void COM_StripExtension(char *in, char *out)
Definition: q_shared.c:826
sizebuf_s::readcount
int readcount
Definition: qcommon.h:99
CL_ParseStartSoundPacket
void CL_ParseStartSoundPacket(void)
Definition: cl_parse.c:590
cvar_s::string
char * string
Definition: q_shared.h:327
CS_MODELS
#define CS_MODELS
Definition: q_shared.h:1112
CL_RegisterTEntSounds
void CL_RegisterTEntSounds(void)
Definition: cl_tent.c:125
CL_ParseConfigString
void CL_ParseConfigString(void)
Definition: cl_parse.c:519
i
int i
Definition: q_shared.c:305
client_state_t::model_clip
struct cmodel_s * model_clip[MAX_MODELS]
Definition: client.h:164
client_static_t::demorecording
qboolean demorecording
Definition: client.h:237
client_state_t::gamedir
char gamedir[MAX_QPATH]
Definition: client.h:155
svc_playerinfo
@ svc_playerinfo
Definition: qcommon.h:243
client_state_t::layout
char layout[1024]
Definition: client.h:138
sizebuf_s::data
byte * data
Definition: qcommon.h:96
centity_t::baseline
entity_state_t baseline
Definition: client.h:57
client_state_t::sound_precache
struct sfx_s * sound_precache[MAX_SOUNDS]
Definition: client.h:166
FS_CreatePath
void FS_CreatePath(char *path)
Definition: files.c:125
CL_RequestNextDownload
void CL_RequestNextDownload(void)
Definition: cl_main.c:1120
cvar_s
Definition: q_shared.h:324
client_state_t::clientinfo
clientinfo_t clientinfo[MAX_CLIENTS]
Definition: client.h:169
PRINT_CHAT
#define PRINT_CHAT
Definition: q_shared.h:100
CL_ParseFrame
void CL_ParseFrame(void)
Definition: cl_ents.c:663
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
va
char * va(char *format,...)
Definition: q_shared.c:1050
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
CL_ParseTEnt
void CL_ParseTEnt(void)
Definition: cl_tent.c:694
CS_IMAGES
#define CS_IMAGES
Definition: q_shared.h:1114
SZ_Print
void SZ_Print(sizebuf_t *buf, char *data)
Definition: common.c:926
cl_noskins
cvar_t * cl_noskins
Definition: cl_main.c:42
SHOWNET
void SHOWNET(char *s)
Definition: cl_parse.c:650
SND_ATTENUATION
#define SND_ATTENUATION
Definition: qcommon.h:302
clientinfo_t::model
struct model_s * model
Definition: client.h:78
CDAudio_Play
qboolean CDAudio_Play(int track, qboolean looping)
Definition: cd_win.c:186
client_static_t::downloadnumber
int downloadnumber
Definition: client.h:232
client_state_t::model_draw
struct model_s * model_draw[MAX_MODELS]
Definition: client.h:163
S_RegisterSound
sfx_t * S_RegisterSound(char *name)
Definition: snd_dma.c:305
r
GLdouble GLdouble r
Definition: qgl_win.c:336
client_static_t::demowaiting
qboolean demowaiting
Definition: client.h:238
CL_ClearState
void CL_ClearState(void)
Definition: cl_main.c:595
clientinfo_t::iconname
char iconname[MAX_QPATH]
Definition: client.h:77
CL_ParseBaseline
void CL_ParseBaseline(void)
Definition: cl_parse.c:359
S_EndRegistration
void S_EndRegistration(void)
Definition: snd_dma.c:328
CL_ParseMuzzleFlash2
void CL_ParseMuzzleFlash2(void)
Definition: cl_fx.c:429
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:406
t
GLdouble t
Definition: qgl_win.c:328
client_static_t::connect_time
float connect_time
Definition: client.h:220
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:98
clientinfo_t::cinfo
char cinfo[MAX_QPATH]
Definition: client.h:74
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1117
SCR_PlayCinematic
void SCR_PlayCinematic(char *arg)
Definition: cl_cin.c:576
PROTOCOL_VERSION
#define PROTOCOL_VERSION
Definition: qcommon.h:197
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:398
DEFAULT_SOUND_PACKET_ATTENUATION
#define DEFAULT_SOUND_PACKET_ATTENUATION
Definition: qcommon.h:308
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
cvar_s::value
float value
Definition: q_shared.h:331
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *msg_read)
Definition: common.c:703
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:81
svc_deltapacketentities
@ svc_deltapacketentities
Definition: qcommon.h:245
con
console_t con
Definition: console.c:25
client_static_t::serverProtocol
int serverProtocol
Definition: client.h:225
MSG_WriteString
void MSG_WriteString(sizebuf_t *sb, char *s)
Definition: common.c:356
NULL
#define NULL
Definition: q_shared.h:67
CL_ParseMuzzleFlash
void CL_ParseMuzzleFlash(void)
Definition: cl_fx.c:238
cl_vwep
cvar_t * cl_vwep
Definition: cl_main.c:88
cl_weaponmodels
char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: cl_view.c:55
MSG_WriteByte
void MSG_WriteByte(sizebuf_t *sb, int c)
Definition: common.c:303
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:181
client_state_t::playernum
int playernum
Definition: client.h:156
svc_layout
@ svc_layout
Definition: qcommon.h:228
refexport_t::RegisterModel
struct model_s *(* RegisterModel)(char *name)
Definition: ref.h:158
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:744
CM_InlineModel
cmodel_t * CM_InlineModel(char *name)
Definition: cmodel.c:639
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1180
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:1119
svc_disconnect
@ svc_disconnect
Definition: qcommon.h:233
svc_serverdata
@ svc_serverdata
Definition: qcommon.h:238
name
cvar_t * name
Definition: cl_main.c:79
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:87
SND_VOLUME
#define SND_VOLUME
Definition: qcommon.h:301
client_state_t::image_precache
struct image_s * image_precache[MAX_IMAGES]
Definition: client.h:167
clientinfo_t::skin
struct image_s * skin
Definition: client.h:75
s
static fixed16_t s
Definition: r_scan.c:30
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:227
re
refexport_t re
Definition: vid_dll.c:32
CL_ParseServerData
void CL_ParseServerData(void)
Definition: cl_parse.c:298
clientinfo_t::weaponmodel
struct model_s * weaponmodel[MAX_CLIENTWEAPONMODELS]
Definition: client.h:79
S_BeginRegistration
void S_BeginRegistration(void)
Definition: snd_dma.c:293
client_static_t::download
FILE * download
Definition: client.h:229
MSG_ReadLong
int MSG_ReadLong(sizebuf_t *msg_read)
Definition: common.c:731
client_static_t::state
connstate_t state
Definition: client.h:204
MSG_ReadString
char * MSG_ReadString(sizebuf_t *msg_read)
Definition: common.c:773
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:559
svc_strings
char * svc_strings[256]
Definition: cl_parse.c:24
svc_configstring
@ svc_configstring
Definition: qcommon.h:239
CL_AddNetgraph
void CL_AddNetgraph(void)
Definition: cl_scrn.c:96
clientinfo_t
Definition: client.h:71
Com_ServerState
int Com_ServerState(void)
Definition: common.c:256
MAX_SOUNDS
#define MAX_SOUNDS
Definition: q_shared.h:90
Cbuf_Execute
void Cbuf_Execute(void)
Definition: cmd.c:194
SCR_CenterPrint
void SCR_CenterPrint(char *str)
Definition: cl_scrn.c:201
clientinfo_t::name
char name[MAX_QPATH]
Definition: client.h:73
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:158
sizebuf_s::cursize
int cursize
Definition: qcommon.h:98
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
Com_DPrintf
void Com_DPrintf(char *fmt,...)
Definition: common.c:157
console_t::ormask
int ormask
Definition: console.h:37
svc_packetentities
@ svc_packetentities
Definition: qcommon.h:244
clientinfo_t::icon
struct image_s * icon
Definition: client.h:76
MSG_ReadPos
void MSG_ReadPos(sizebuf_t *msg_read, vec3_t pos)
Definition: common.c:818
client_static_t::downloadname
char downloadname[MAX_OSPATH]
Definition: client.h:231
ca_connected
@ ca_connected
Definition: client.h:188
S_StartLocalSound
void S_StartLocalSound(char *sound)
Definition: snd_dma.c:738
svc_download
@ svc_download
Definition: qcommon.h:242
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:104
CL_SetLightstyle
void CL_SetLightstyle(int i)
Definition: cl_fx.c:92
svc_reconnect
@ svc_reconnect
Definition: qcommon.h:234
CS_LIGHTS
#define CS_LIGHTS
Definition: q_shared.h:1115
SND_ENT
#define SND_ENT
Definition: qcommon.h:304
svc_spawnbaseline
@ svc_spawnbaseline
Definition: qcommon.h:240
clc_stringcmd
@ clc_stringcmd
Definition: qcommon.h:260
cls
client_static_t cls
Definition: cl_main.c:90
svc_muzzleflash2
@ svc_muzzleflash2
Definition: qcommon.h:226
svc_sound
@ svc_sound
Definition: qcommon.h:235
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, char *s)
Definition: cl_parse.c:380
client_static_t::downloadtempname
char downloadtempname[MAX_OSPATH]
Definition: client.h:230
MAX_LIGHTSTYLES
#define MAX_LIGHTSTYLES
Definition: q_shared.h:88
channel
Definition: jar_mod.h:142
svc_stufftext
@ svc_stufftext
Definition: qcommon.h:237
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:93
cl
client_state_t cl
Definition: cl_main.c:91
CL_DownloadFileName
void CL_DownloadFileName(char *dest, int destlen, char *fn)
Definition: cl_parse.c:53
ERR_DISCONNECT
#define ERR_DISCONNECT
Definition: q_shared.h:106
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
CL_ParseDelta
void CL_ParseDelta(entity_state_t *from, entity_state_t *to, int number, int bits)
Definition: cl_ents.c:247
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
fs_gamedirvar
cvar_t * fs_gamedirvar
Definition: files.c:64
svc_print
@ svc_print
Definition: qcommon.h:236
S_StartSound
void S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx, float fvol, float attenuation, float timeofs)
Definition: snd_dma.c:655
client_static_t::netchan
netchan_t netchan
Definition: client.h:224
client_static_t::downloadpercent
int downloadpercent
Definition: client.h:234