icculus quake2 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  char *ptr;
74 
75  if (strstr (filename, ".."))
76  {
77  Com_Printf ("Refusing to download a path with ..\n");
78  return true;
79  }
80 
81 #ifndef _WIN32
82  // fix backslashes
83  while ((ptr=strchr(filename,'\\'))) {
84  *ptr = '/';
85  }
86 #endif
87  if (FS_LoadFile (filename, NULL) != -1)
88  { // it exists, no need to download
89  return true;
90  }
91 
92  strcpy (cls.downloadname, filename);
93 
94  // download to a temp name, and only rename
95  // to the real name when done, so if interrupted
96  // a runt file wont be left
98  strcat (cls.downloadtempname, ".tmp");
99 
100 //ZOID
101  // check to see if we already have a tmp for this file, if so, try to resume
102  // open the file if not opened yet
104 
105 // FS_CreatePath (name);
106 
107  fp = fopen (name, "r+b");
108  if (fp) { // it exists
109  int len;
110  fseek(fp, 0, SEEK_END);
111  len = ftell(fp);
112 
113  cls.download = fp;
114 
115  // give the server an offset to start the download
116  Com_Printf ("Resuming %s\n", cls.downloadname);
119  va("download %s %i", cls.downloadname, len));
120  } else {
121  Com_Printf ("Downloading %s\n", cls.downloadname);
124  va("download %s", cls.downloadname));
125  }
126 
128 
129  return false;
130 }

Referenced by CL_RequestNextDownload().

◆ CL_Download_f()

void CL_Download_f ( void  )

Definition at line 139 of file cl_parse.c.

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

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 387 of file cl_parse.c.

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

Referenced by CL_ParseClientinfo(), and CL_PrepRefresh().

◆ CL_ParseBaseline()

void CL_ParseBaseline ( void  )

Definition at line 366 of file cl_parse.c.

367 {
368  entity_state_t *es;
369  unsigned bits;
370  int newnum;
371  entity_state_t nullstate;
372 
373  memset (&nullstate, 0, sizeof(nullstate));
374 
375  newnum = CL_ParseEntityBits (&bits);
376  es = &cl_entities[newnum].baseline;
377  CL_ParseDelta (&nullstate, es, newnum, bits);
378 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseClientinfo()

void CL_ParseClientinfo ( int  player)

Definition at line 508 of file cl_parse.c.

509 {
510  char *s;
511  clientinfo_t *ci;
512 
513  s = cl.configstrings[player+CS_PLAYERSKINS];
514 
515  ci = &cl.clientinfo[player];
516 
517  CL_LoadClientinfo (ci, s);
518 }

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

◆ CL_ParseConfigString()

void CL_ParseConfigString ( void  )

Definition at line 526 of file cl_parse.c.

527 {
528  int i;
529  char *s;
530  char olds[MAX_QPATH];
531 
533  if (i < 0 || i >= MAX_CONFIGSTRINGS)
534  Com_Error (ERR_DROP, "configstring > MAX_CONFIGSTRINGS");
536 
537  strncpy (olds, cl.configstrings[i], sizeof(olds));
538  olds[sizeof(olds) - 1] = 0;
539 
540  strcpy (cl.configstrings[i], s);
541 
542  // do something apropriate
543 
544  if (i >= CS_LIGHTS && i < CS_LIGHTS+MAX_LIGHTSTYLES)
546  else if (i == CS_CDTRACK)
547  {
548  if (cl.refresh_prepped)
549  CDAudio_Play (atoi(cl.configstrings[CS_CDTRACK]), true);
550  }
551  else if (i >= CS_MODELS && i < CS_MODELS+MAX_MODELS)
552  {
553  if (cl.refresh_prepped)
554  {
556  if (cl.configstrings[i][0] == '*')
558  else
560  }
561  }
562  else if (i >= CS_SOUNDS && i < CS_SOUNDS+MAX_MODELS)
563  {
564  if (cl.refresh_prepped)
566  }
567  else if (i >= CS_IMAGES && i < CS_IMAGES+MAX_MODELS)
568  {
569  if (cl.refresh_prepped)
571  }
572  else if (i >= CS_PLAYERSKINS && i < CS_PLAYERSKINS+MAX_CLIENTS)
573  {
574  if (cl.refresh_prepped && strcmp(olds, s))
576  }
577 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseDownload()

void CL_ParseDownload ( void  )

Definition at line 207 of file cl_parse.c.

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

Referenced by CL_ParseServerMessage().

◆ CL_ParseServerData()

void CL_ParseServerData ( void  )

Definition at line 305 of file cl_parse.c.

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

Referenced by CL_ParseServerMessage().

◆ CL_ParseServerMessage()

void CL_ParseServerMessage ( void  )

Definition at line 664 of file cl_parse.c.

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

Referenced by CL_ReadPackets().

◆ CL_ParseStartSoundPacket()

void CL_ParseStartSoundPacket ( void  )

Definition at line 593 of file cl_parse.c.

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

Referenced by CL_ParseServerMessage().

◆ CL_RegisterSounds()

void CL_RegisterSounds ( void  )

Definition at line 183 of file cl_parse.c.

184 {
185  int i;
186 
189  for (i=1 ; i<MAX_SOUNDS ; i++)
190  {
191  if (!cl.configstrings[CS_SOUNDS+i][0])
192  break;
194  Sys_SendKeyEvents (); // pump message loop
195  }
197 }

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

◆ SHOWNET()

void SHOWNET ( char *  s)

Definition at line 653 of file cl_parse.c.

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

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:177
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:79
svc_nop
@ svc_nop
Definition: qcommon.h:215
svc_centerprint
@ svc_centerprint
Definition: qcommon.h:224
client_state_t::servercount
int servercount
Definition: client.h:174
SND_POS
#define SND_POS
Definition: qcommon.h:286
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
CL_ParseInventory
void CL_ParseInventory(void)
Definition: cl_inv.c:29
MAX_MODELS
#define MAX_MODELS
Definition: q_shared.h:82
SND_OFFSET
#define SND_OFFSET
Definition: qcommon.h:288
CS_SOUNDS
#define CS_SOUNDS
Definition: q_shared.h:1137
CL_ParseClientinfo
void CL_ParseClientinfo(int player)
Definition: cl_parse.c:508
client_state_t::attractloop
qboolean attractloop
Definition: client.h:173
svc_muzzleflash
@ svc_muzzleflash
Definition: qcommon.h:208
svc_frame
@ svc_frame
Definition: qcommon.h:229
CL_WriteDemoMessage
void CL_WriteDemoMessage(void)
Definition: cl_main.c:128
MSG_ReadShort
int MSG_ReadShort(sizebuf_t *msg_read)
Definition: common.c:735
num_cl_weaponmodels
int num_cl_weaponmodels
Definition: cl_view.c:55
net_message
sizebuf_t net_message
Definition: net_chan.c:82
entity_state_s
Definition: q_shared.h:1169
cl_shownet
cvar_t * cl_shownet
Definition: cl_main.c:71
netchan_t::message
sizebuf_t message
Definition: qcommon.h:600
CL_ParseDownload
void CL_ParseDownload(void)
Definition: cl_parse.c:207
ca_connecting
@ ca_connecting
Definition: client.h:207
model_s::flags
int flags
Definition: r_model.h:180
CS_CDTRACK
#define CS_CDTRACK
Definition: q_shared.h:1126
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:178
BASEDIRNAME
#define BASEDIRNAME
Definition: qcommon.h:28
svc_inventory
@ svc_inventory
Definition: qcommon.h:212
CL_ParseEntityBits
int CL_ParseEntityBits(unsigned *bits)
just for protocol profiling
Definition: cl_ents.c:202
DEFAULT_SOUND_PACKET_VOLUME
#define DEFAULT_SOUND_PACKET_VOLUME
Definition: qcommon.h:290
COM_StripExtension
void COM_StripExtension(char *in, char *out)
Definition: q_shared.c:826
sizebuf_s::readcount
int readcount
Definition: qcommon.h:82
CL_ParseStartSoundPacket
void CL_ParseStartSoundPacket(void)
Definition: cl_parse.c:593
cvar_s::string
char * string
Definition: q_shared.h:320
CS_MODELS
#define CS_MODELS
Definition: q_shared.h:1136
CL_RegisterTEntSounds
void CL_RegisterTEntSounds(void)
Definition: cl_tent.c:141
CL_ParseConfigString
void CL_ParseConfigString(void)
Definition: cl_parse.c:526
i
int i
Definition: q_shared.c:305
client_state_t::model_clip
struct cmodel_s * model_clip[MAX_MODELS]
Definition: client.h:184
client_static_t::demorecording
qboolean demorecording
Definition: client.h:257
client_state_t::gamedir
char gamedir[MAX_QPATH]
Definition: client.h:175
svc_playerinfo
@ svc_playerinfo
Definition: qcommon.h:226
client_state_t::layout
char layout[1024]
Definition: client.h:158
sizebuf_s::data
byte * data
Definition: qcommon.h:79
centity_t::baseline
entity_state_t baseline
Definition: client.h:77
client_state_t::sound_precache
struct sfx_s * sound_precache[MAX_SOUNDS]
Definition: client.h:186
FS_CreatePath
void FS_CreatePath(char *path)
Definition: files.c:125
CL_RequestNextDownload
void CL_RequestNextDownload(void)
Definition: cl_main.c:1141
cvar_s
Definition: q_shared.h:317
client_state_t::clientinfo
clientinfo_t clientinfo[MAX_CLIENTS]
Definition: client.h:189
PRINT_CHAT
#define PRINT_CHAT
Definition: q_shared.h:93
CL_ParseFrame
void CL_ParseFrame(void)
Definition: cl_ents.c:676
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:740
CS_IMAGES
#define CS_IMAGES
Definition: q_shared.h:1138
CDAudio_Play
void CDAudio_Play(int track, qboolean looping)
Definition: cd_win.c:182
SZ_Print
void SZ_Print(sizebuf_t *buf, char *data)
Definition: common.c:945
cl_noskins
cvar_t * cl_noskins
Definition: cl_main.c:42
SHOWNET
void SHOWNET(char *s)
Definition: cl_parse.c:653
SND_ATTENUATION
#define SND_ATTENUATION
Definition: qcommon.h:285
clientinfo_t::model
struct model_s * model
Definition: client.h:98
client_static_t::downloadnumber
int downloadnumber
Definition: client.h:252
client_state_t::model_draw
struct model_s * model_draw[MAX_MODELS]
Definition: client.h:183
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:258
CL_ClearState
void CL_ClearState(void)
Definition: cl_main.c:610
clientinfo_t::iconname
char iconname[MAX_QPATH]
Definition: client.h:97
CL_ParseBaseline
void CL_ParseBaseline(void)
Definition: cl_parse.c:366
S_EndRegistration
void S_EndRegistration(void)
Definition: snd_dma.c:328
CL_ParseMuzzleFlash2
void CL_ParseMuzzleFlash2(void)
Definition: cl_fx.c:529
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:376
t
GLdouble t
Definition: qgl_win.c:328
client_static_t::connect_time
float connect_time
Definition: client.h:240
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:118
clientinfo_t::cinfo
char cinfo[MAX_QPATH]
Definition: client.h:94
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1141
SCR_PlayCinematic
void SCR_PlayCinematic(char *arg)
Definition: cl_cin.c:576
PROTOCOL_VERSION
#define PROTOCOL_VERSION
Definition: qcommon.h:180
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:394
DEFAULT_SOUND_PACKET_ATTENUATION
#define DEFAULT_SOUND_PACKET_ATTENUATION
Definition: qcommon.h:291
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
cvar_s::value
float value
Definition: q_shared.h:324
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *msg_read)
Definition: common.c:722
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:74
svc_deltapacketentities
@ svc_deltapacketentities
Definition: qcommon.h:228
con
console_t con
Definition: console.c:24
client_static_t::serverProtocol
int serverProtocol
Definition: client.h:245
MSG_WriteString
void MSG_WriteString(sizebuf_t *sb, char *s)
Definition: common.c:375
NULL
#define NULL
Definition: q_shared.h:60
CL_ParseMuzzleFlash
void CL_ParseMuzzleFlash(void)
Definition: cl_fx.c:338
cl_vwep
cvar_t * cl_vwep
Definition: cl_main.c:103
cl_weaponmodels
char cl_weaponmodels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
Definition: cl_view.c:54
MSG_WriteByte
void MSG_WriteByte(sizebuf_t *sb, int c)
Definition: common.c:322
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
client_state_t::playernum
int playernum
Definition: client.h:176
svc_layout
@ svc_layout
Definition: qcommon.h:211
refexport_t::RegisterModel
struct model_s *(* RegisterModel)(char *name)
Definition: ref.h:176
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
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:1192
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:1143
svc_disconnect
@ svc_disconnect
Definition: qcommon.h:216
svc_serverdata
@ svc_serverdata
Definition: qcommon.h:221
name
cvar_t * name
Definition: cl_main.c:94
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:80
SND_VOLUME
#define SND_VOLUME
Definition: qcommon.h:284
client_state_t::image_precache
struct image_s * image_precache[MAX_IMAGES]
Definition: client.h:187
clientinfo_t::skin
struct image_s * skin
Definition: client.h:95
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:210
re
refexport_t re
Definition: vid_dll.c:31
CL_ParseServerData
void CL_ParseServerData(void)
Definition: cl_parse.c:305
clientinfo_t::weaponmodel
struct model_s * weaponmodel[MAX_CLIENTWEAPONMODELS]
Definition: client.h:99
S_BeginRegistration
void S_BeginRegistration(void)
Definition: snd_dma.c:293
client_static_t::download
FILE * download
Definition: client.h:249
MSG_ReadLong
int MSG_ReadLong(sizebuf_t *msg_read)
Definition: common.c:750
client_static_t::state
connstate_t state
Definition: client.h:224
MSG_ReadString
char * MSG_ReadString(sizebuf_t *msg_read)
Definition: common.c:792
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:590
svc_strings
char * svc_strings[256]
Definition: cl_parse.c:24
svc_configstring
@ svc_configstring
Definition: qcommon.h:222
CL_AddNetgraph
void CL_AddNetgraph(void)
Definition: cl_scrn.c:98
clientinfo_t
Definition: client.h:91
Com_ServerState
int Com_ServerState(void)
Definition: common.c:275
MAX_SOUNDS
#define MAX_SOUNDS
Definition: q_shared.h:83
Cbuf_Execute
void Cbuf_Execute(void)
Definition: cmd.c:194
SCR_CenterPrint
void SCR_CenterPrint(char *str)
Definition: cl_scrn.c:203
clientinfo_t::name
char name[MAX_QPATH]
Definition: client.h:93
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:178
sizebuf_s::cursize
int cursize
Definition: qcommon.h:81
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:155
console_t::ormask
int ormask
Definition: console.h:37
svc_packetentities
@ svc_packetentities
Definition: qcommon.h:227
clientinfo_t::icon
struct image_s * icon
Definition: client.h:96
MSG_ReadPos
void MSG_ReadPos(sizebuf_t *msg_read, vec3_t pos)
Definition: common.c:837
client_static_t::downloadname
char downloadname[MAX_OSPATH]
Definition: client.h:251
ca_connected
@ ca_connected
Definition: client.h:208
S_StartLocalSound
void S_StartLocalSound(char *sound)
Definition: snd_dma.c:738
svc_download
@ svc_download
Definition: qcommon.h:225
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:102
CL_SetLightstyle
void CL_SetLightstyle(int i)
Definition: cl_fx.c:192
svc_reconnect
@ svc_reconnect
Definition: qcommon.h:217
CS_LIGHTS
#define CS_LIGHTS
Definition: q_shared.h:1139
SND_ENT
#define SND_ENT
Definition: qcommon.h:287
svc_spawnbaseline
@ svc_spawnbaseline
Definition: qcommon.h:223
clc_stringcmd
@ clc_stringcmd
Definition: qcommon.h:243
cls
client_static_t cls
Definition: cl_main.c:105
svc_muzzleflash2
@ svc_muzzleflash2
Definition: qcommon.h:209
svc_sound
@ svc_sound
Definition: qcommon.h:218
CL_LoadClientinfo
void CL_LoadClientinfo(clientinfo_t *ci, char *s)
Definition: cl_parse.c:387
client_static_t::downloadtempname
char downloadtempname[MAX_OSPATH]
Definition: client.h:250
MAX_LIGHTSTYLES
#define MAX_LIGHTSTYLES
Definition: q_shared.h:81
svc_stufftext
@ svc_stufftext
Definition: qcommon.h:220
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:108
cl
client_state_t cl
Definition: cl_main.c:106
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:99
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
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:1236
fs_gamedirvar
cvar_t * fs_gamedirvar
Definition: files.c:64
svc_print
@ svc_print
Definition: qcommon.h:219
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:244
client_static_t::downloadpercent
int downloadpercent
Definition: client.h:254