vkQuake2 doxygen  1.0 dev
cl_main.c
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
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 // cl_main.c -- client main loop
21 
22 #include "client.h"
23 
25 
35 
38 
41 
47 //cvar_t *cl_minfps;
50 
55 
59 
62 
66 
71 
73 
74 //
75 // userinfo
76 //
87 
89 
92 
94 
96 
97 extern cvar_t *allow_download;
102 
103 extern void SV_ShutdownGameProgs(void);
104 
105 //======================================================================
106 
107 
108 /*
109 ====================
110 CL_WriteDemoMessage
111 
112 Dumps the current net message, prefixed by the length
113 ====================
114 */
116 {
117  int len, swlen;
118 
119  // the first eight bytes are just packet sequencing stuff
120  len = net_message.cursize-8;
121  swlen = LittleLong(len);
122  fwrite (&swlen, 4, 1, cls.demofile);
123  fwrite (net_message.data+8, len, 1, cls.demofile);
124 }
125 
126 
127 /*
128 ====================
129 CL_Stop_f
130 
131 stop recording a demo
132 ====================
133 */
134 void CL_Stop_f (void)
135 {
136  int len;
137 
138  if (!cls.demorecording)
139  {
140  Com_Printf ("Not recording a demo.\n");
141  return;
142  }
143 
144 // finish up
145  len = -1;
146  fwrite (&len, 4, 1, cls.demofile);
147  fclose (cls.demofile);
148  cls.demofile = NULL;
149  cls.demorecording = false;
150  Com_Printf ("Stopped demo.\n");
151 }
152 
153 /*
154 ====================
155 CL_Record_f
156 
157 record <demoname>
158 
159 Begins recording a demo from the current position
160 ====================
161 */
162 void CL_Record_f (void)
163 {
164  char name[MAX_OSPATH];
165  char buf_data[MAX_MSGLEN];
166  sizebuf_t buf;
167  int i;
168  int len;
169  entity_state_t *ent;
170  entity_state_t nullstate;
171 
172  if (Cmd_Argc() != 2)
173  {
174  Com_Printf ("record <demoname>\n");
175  return;
176  }
177 
178  if (cls.demorecording)
179  {
180  Com_Printf ("Already recording.\n");
181  return;
182  }
183 
184  if (cls.state != ca_active)
185  {
186  Com_Printf ("You must be in a level to record.\n");
187  return;
188  }
189 
190  //
191  // open the demo file
192  //
193  Com_sprintf (name, sizeof(name), "%s/demos/%s.dm2", FS_Gamedir(), Cmd_Argv(1));
194 
195  Com_Printf ("recording to %s.\n", name);
197  cls.demofile = fopen (name, "wb");
198  if (!cls.demofile)
199  {
200  Com_Printf ("ERROR: couldn't open.\n");
201  return;
202  }
203  cls.demorecording = true;
204 
205  // don't start saving messages until a non-delta compressed message is received
206  cls.demowaiting = true;
207 
208  //
209  // write out messages to hold the startup information
210  //
211  SZ_Init (&buf, buf_data, sizeof(buf_data));
212 
213  // send the serverdata
216  MSG_WriteLong (&buf, 0x10000 + cl.servercount);
217  MSG_WriteByte (&buf, 1); // demos are always attract loops
218  MSG_WriteString (&buf, cl.gamedir);
219  MSG_WriteShort (&buf, cl.playernum);
220 
222 
223  // configstrings
224  for (i=0 ; i<MAX_CONFIGSTRINGS ; i++)
225  {
226  if (cl.configstrings[i][0])
227  {
228  if (buf.cursize + strlen (cl.configstrings[i]) + 32 > buf.maxsize)
229  { // write it out
230  len = LittleLong (buf.cursize);
231  fwrite (&len, 4, 1, cls.demofile);
232  fwrite (buf.data, buf.cursize, 1, cls.demofile);
233  buf.cursize = 0;
234  }
235 
237  MSG_WriteShort (&buf, i);
239  }
240 
241  }
242 
243  // baselines
244  memset (&nullstate, 0, sizeof(nullstate));
245  for (i=0; i<MAX_EDICTS ; i++)
246  {
247  ent = &cl_entities[i].baseline;
248  if (!ent->modelindex)
249  continue;
250 
251  if (buf.cursize + 64 > buf.maxsize)
252  { // write it out
253  len = LittleLong (buf.cursize);
254  fwrite (&len, 4, 1, cls.demofile);
255  fwrite (buf.data, buf.cursize, 1, cls.demofile);
256  buf.cursize = 0;
257  }
258 
260  MSG_WriteDeltaEntity (&nullstate, &cl_entities[i].baseline, &buf, true, true);
261  }
262 
264  MSG_WriteString (&buf, "precache\n");
265 
266  // write it to the demo file
267 
268  len = LittleLong (buf.cursize);
269  fwrite (&len, 4, 1, cls.demofile);
270  fwrite (buf.data, buf.cursize, 1, cls.demofile);
271 
272  // the rest of the demo file will be individual frames
273 }
274 
275 //======================================================================
276 
277 /*
278 ===================
279 Cmd_ForwardToServer
280 
281 adds the current command line as a clc_stringcmd to the client message.
282 things like godmode, noclip, etc, are commands directed to the server,
283 so when they are typed in at the console, they will need to be forwarded.
284 ===================
285 */
287 {
288  char *cmd;
289 
290  cmd = Cmd_Argv(0);
291  if (cls.state <= ca_connected || *cmd == '-' || *cmd == '+')
292  {
293  Com_Printf ("Unknown command \"%s\"\n", cmd);
294  return;
295  }
296 
298  SZ_Print (&cls.netchan.message, cmd);
299  if (Cmd_Argc() > 1)
300  {
301  SZ_Print (&cls.netchan.message, " ");
303  }
304 }
305 
306 void CL_Setenv_f( void )
307 {
308  int argc = Cmd_Argc();
309 
310  if ( argc > 2 )
311  {
312  char buffer[1000];
313  int i;
314 
315  strcpy( buffer, Cmd_Argv(1) );
316  strcat( buffer, "=" );
317 
318  for ( i = 2; i < argc; i++ )
319  {
320  strcat( buffer, Cmd_Argv( i ) );
321  strcat( buffer, " " );
322  }
323 
324  putenv( buffer );
325  }
326  else if ( argc == 2 )
327  {
328  char *env = getenv( Cmd_Argv(1) );
329 
330  if ( env )
331  {
332  Com_Printf( "%s=%s\n", Cmd_Argv(1), env );
333  }
334  else
335  {
336  Com_Printf( "%s undefined\n", Cmd_Argv(1), env );
337  }
338  }
339 }
340 
341 
342 /*
343 ==================
344 CL_ForwardToServer_f
345 ==================
346 */
348 {
349  if (cls.state != ca_connected && cls.state != ca_active)
350  {
351  Com_Printf ("Can't \"%s\", not connected\n", Cmd_Argv(0));
352  return;
353  }
354 
355  // don't forward the first argument
356  if (Cmd_Argc() > 1)
357  {
360  }
361 }
362 
363 
364 /*
365 ==================
366 CL_Pause_f
367 ==================
368 */
369 void CL_Pause_f (void)
370 {
371  // never pause in multiplayer
372  if (Cvar_VariableValue ("maxclients") > 1 || !Com_ServerState ())
373  {
374  Cvar_SetValue ("paused", 0);
375  return;
376  }
377 
378  Cvar_SetValue ("paused", !cl_paused->value);
379 }
380 
381 /*
382 ==================
383 CL_Quit_f
384 ==================
385 */
386 void CL_Quit_f (void)
387 {
388  CL_Disconnect ();
389  Com_Quit ();
390 }
391 
392 /*
393 ================
394 CL_Drop
395 
396 Called after an ERR_DROP was thrown
397 ================
398 */
399 void CL_Drop (void)
400 {
401  if (cls.state == ca_uninitialized)
402  return;
403  if (cls.state == ca_disconnected)
404  return;
405 
406  CL_Disconnect ();
407 
408  // drop loading plaque unless this is the initial game start
409  if (cls.disable_servercount != -1)
410  SCR_EndLoadingPlaque (); // get rid of loading plaque
411 }
412 
413 
414 /*
415 =======================
416 CL_SendConnectPacket
417 
418 We have gotten a challenge from the server, so try and
419 connect.
420 ======================
421 */
423 {
424  netadr_t adr;
425  int port;
426 
427  if (!NET_StringToAdr (cls.servername, &adr))
428  {
429  Com_Printf ("Bad server address\n");
430  cls.connect_time = 0;
431  return;
432  }
433  if (adr.port == 0)
434  adr.port = BigShort (PORT_SERVER);
435 
436  port = Cvar_VariableValue ("qport");
437  userinfo_modified = false;
438 
439  Netchan_OutOfBandPrint (NS_CLIENT, adr, "connect %i %i %i \"%s\"\n",
441 }
442 
443 /*
444 =================
445 CL_CheckForResend
446 
447 Resend a connect message if the last one has timed out
448 =================
449 */
450 void CL_CheckForResend (void)
451 {
452  netadr_t adr;
453 
454  // if the local server is running and we aren't
455  // then connect
457  {
459  strncpy (cls.servername, "localhost", sizeof(cls.servername)-1);
460  // we don't need a challenge on the localhost
462  return;
463 // cls.connect_time = -99999; // CL_CheckForResend() will fire immediately
464  }
465 
466  // resend if we haven't gotten a reply yet
467  if (cls.state != ca_connecting)
468  return;
469 
470  if (cls.realtime - cls.connect_time < 3000)
471  return;
472 
473  if (!NET_StringToAdr (cls.servername, &adr))
474  {
475  Com_Printf ("Bad server address\n");
477  return;
478  }
479  if (adr.port == 0)
480  adr.port = BigShort (PORT_SERVER);
481 
482  cls.connect_time = cls.realtime; // for retransmit requests
483 
484  Com_Printf ("Connecting to %s...\n", cls.servername);
485 
486  Netchan_OutOfBandPrint (NS_CLIENT, adr, "getchallenge\n");
487 }
488 
489 
490 /*
491 ================
492 CL_Connect_f
493 
494 ================
495 */
496 void CL_Connect_f (void)
497 {
498  char *server;
499 
500  if (Cmd_Argc() != 2)
501  {
502  Com_Printf ("usage: connect <server>\n");
503  return;
504  }
505 
506  if (Com_ServerState ())
507  { // if running a local server, kill it and reissue
508  SV_Shutdown (va("Server quit\n", msg), false);
510  }
511  else
512  {
513  CL_Disconnect ();
514  }
515 
516  server = Cmd_Argv (1);
517 
518  NET_Config (true); // allow remote
519 
520  CL_Disconnect ();
521 
523  strncpy (cls.servername, server, sizeof(cls.servername)-1);
524  cls.connect_time = -99999; // CL_CheckForResend() will fire immediately
525 }
526 
527 
528 /*
529 =====================
530 CL_Rcon_f
531 
532  Send the rest of the command line over as
533  an unconnected command.
534 =====================
535 */
536 void CL_Rcon_f (void)
537 {
538  char message[1024];
539  int i;
540  netadr_t to;
541 
543  {
544  Com_Printf ("You must set 'rcon_password' before\n"
545  "issuing an rcon command.\n");
546  return;
547  }
548 
549  message[0] = (char)255;
550  message[1] = (char)255;
551  message[2] = (char)255;
552  message[3] = (char)255;
553  message[4] = 0;
554 
555  NET_Config (true); // allow remote
556 
557  strcat (message, "rcon ");
558 
559  strcat (message, rcon_client_password->string);
560  strcat (message, " ");
561 
562  for (i=1 ; i<Cmd_Argc() ; i++)
563  {
564  strcat (message, Cmd_Argv(i));
565  strcat (message, " ");
566  }
567 
568  if (cls.state >= ca_connected)
570  else
571  {
572  if (!strlen(rcon_address->string))
573  {
574  Com_Printf ("You must either be connected,\n"
575  "or set the 'rcon_address' cvar\n"
576  "to issue rcon commands\n");
577 
578  return;
579  }
581  if (to.port == 0)
582  to.port = BigShort (PORT_SERVER);
583  }
584 
585  NET_SendPacket (NS_CLIENT, (int)strlen(message)+1, message, to);
586 }
587 
588 
589 /*
590 =====================
591 CL_ClearState
592 
593 =====================
594 */
595 void CL_ClearState (void)
596 {
597  S_StopAllSounds ();
598  CL_ClearEffects ();
599  CL_ClearTEnts ();
600 
601 // wipe the entire cl structure
602  memset (&cl, 0, sizeof(cl));
603  memset (&cl_entities, 0, sizeof(cl_entities));
604 
606 
607 }
608 
609 /*
610 =====================
611 CL_Disconnect
612 
613 Goes from a connected state to full screen console state
614 Sends a disconnect message to the server
615 This is also called on Com_Error, so it shouldn't cause any errors
616 =====================
617 */
618 void CL_Disconnect (void)
619 {
620  byte final[32];
621 
622  if (cls.state == ca_disconnected)
623  return;
624 
625  if (cl_timedemo && cl_timedemo->value)
626  {
627  int time;
628 
629  time = Sys_Milliseconds () - cl.timedemo_start;
630  if (time > 0)
631  Com_Printf ("%i frames, %3.1f seconds: %3.1f fps\n", cl.timedemo_frames,
632  time/1000.0, cl.timedemo_frames*1000.0 / time);
633  }
634 
637 
638  M_ForceMenuOff ();
639 
640  cls.connect_time = 0;
641 
643 
644  if (cls.demorecording)
645  CL_Stop_f ();
646 
647  // send a disconnect message to the server
648  final[0] = clc_stringcmd;
649  strcpy ((char *)final+1, "disconnect");
650  Netchan_Transmit (&cls.netchan, (int)strlen(final), final);
651  Netchan_Transmit (&cls.netchan, (int)strlen(final), final);
652  Netchan_Transmit (&cls.netchan, (int)strlen(final), final);
653 
654  CL_ClearState ();
655 
656  // stop download
657  if (cls.download) {
658  fclose(cls.download);
659  cls.download = NULL;
660  }
661 
663 }
664 
665 void CL_Disconnect_f (void)
666 {
667  Com_Error (ERR_DROP, "Disconnected from server");
668 }
669 
670 
671 /*
672 ====================
673 CL_Packet_f
674 
675 packet <destination> <contents>
676 
677 Contents allows \n escape character
678 ====================
679 */
680 void CL_Packet_f (void)
681 {
682  char send[2048];
683  int i, l;
684  char *in, *out;
685  netadr_t adr;
686 
687  if (Cmd_Argc() != 3)
688  {
689  Com_Printf ("packet <destination> <contents>\n");
690  return;
691  }
692 
693  NET_Config (true); // allow remote
694 
695  if (!NET_StringToAdr (Cmd_Argv(1), &adr))
696  {
697  Com_Printf ("Bad address\n");
698  return;
699  }
700  if (!adr.port)
701  adr.port = BigShort (PORT_SERVER);
702 
703  in = Cmd_Argv(2);
704  out = send+4;
705  send[0] = send[1] = send[2] = send[3] = (char)0xff;
706 
707  l = (int)strlen (in);
708  for (i=0 ; i<l ; i++)
709  {
710  if (in[i] == '\\' && in[i+1] == 'n')
711  {
712  *out++ = '\n';
713  i++;
714  }
715  else
716  *out++ = in[i];
717  }
718  *out = 0;
719 
720  NET_SendPacket (NS_CLIENT, out-send, send, adr);
721 }
722 
723 /*
724 =================
725 CL_Changing_f
726 
727 Just sent as a hint to the client that they should
728 drop to full console
729 =================
730 */
731 void CL_Changing_f (void)
732 {
733  //ZOID
734  //if we are downloading, we don't change! This so we don't suddenly stop downloading a map
735  if (cls.download)
736  return;
737 
739  cls.state = ca_connected; // not active anymore, but not disconnected
740  Com_Printf ("\nChanging map...\n");
741 }
742 
743 
744 /*
745 =================
746 CL_Reconnect_f
747 
748 The server is changing levels
749 =================
750 */
751 void CL_Reconnect_f (void)
752 {
753  //ZOID
754  //if we are downloading, we don't change! This so we don't suddenly stop downloading a map
755  if (cls.download)
756  return;
757 
758  S_StopAllSounds ();
759  if (cls.state == ca_connected) {
760  Com_Printf ("reconnecting...\n");
763  MSG_WriteString (&cls.netchan.message, "new");
764  return;
765  }
766 
767  if (*cls.servername) {
768  if (cls.state >= ca_connected) {
769  CL_Disconnect();
770  cls.connect_time = cls.realtime - 1500;
771  } else
772  cls.connect_time = -99999; // fire immediately
773 
775  Com_Printf ("reconnecting...\n");
776  }
777 }
778 
779 /*
780 =================
781 CL_ParseStatusMessage
782 
783 Handle a reply from a ping
784 =================
785 */
787 {
788  char *s;
789 
791 
792  Com_Printf ("%s\n", s);
794 }
795 
796 
797 /*
798 =================
799 CL_PingServers_f
800 =================
801 */
802 void CL_PingServers_f (void)
803 {
804  int i;
805  netadr_t adr;
806  char name[32];
807  char *adrstring;
808  cvar_t *noudp;
809  cvar_t *noipx;
810 
811  NET_Config (true); // allow remote
812 
813  // send a broadcast packet
814  Com_Printf ("pinging broadcast...\n");
815 
816  noudp = Cvar_Get ("noudp", "0", CVAR_NOSET);
817  if (!noudp->value)
818  {
819  adr.type = NA_BROADCAST;
820  adr.port = BigShort(PORT_SERVER);
822  }
823 
824  noipx = Cvar_Get ("noipx", "0", CVAR_NOSET);
825  if (!noipx->value)
826  {
827  adr.type = NA_BROADCAST_IPX;
828  adr.port = BigShort(PORT_SERVER);
830  }
831 
832  // send a packet to each address book entry
833  for (i=0 ; i<16 ; i++)
834  {
835  Com_sprintf (name, sizeof(name), "adr%i", i);
836  adrstring = Cvar_VariableString (name);
837  if (!adrstring || !adrstring[0])
838  continue;
839 
840  Com_Printf ("pinging %s...\n", adrstring);
841  if (!NET_StringToAdr (adrstring, &adr))
842  {
843  Com_Printf ("Bad address: %s\n", adrstring);
844  continue;
845  }
846  if (!adr.port)
847  adr.port = BigShort(PORT_SERVER);
849  }
850 }
851 
852 
853 /*
854 =================
855 CL_Skins_f
856 
857 Load or download any custom player skins and models
858 =================
859 */
860 void CL_Skins_f (void)
861 {
862  int i;
863 
864  for (i=0 ; i<MAX_CLIENTS ; i++)
865  {
866  if (!cl.configstrings[CS_PLAYERSKINS+i][0])
867  continue;
868  Com_Printf ("client %i: %s\n", i, cl.configstrings[CS_PLAYERSKINS+i]);
869  SCR_UpdateScreen ();
870  Sys_SendKeyEvents (); // pump message loop
872  }
873 }
874 
875 
876 /*
877 =================
878 CL_ConnectionlessPacket
879 
880 Responses to broadcasts, etc
881 =================
882 */
884 {
885  char *s;
886  char *c;
887 
889  MSG_ReadLong (&net_message); // skip the -1
890 
892 
893  Cmd_TokenizeString (s, false);
894 
895  c = Cmd_Argv(0);
896 
897  Com_Printf ("%s: %s\n", NET_AdrToString (net_from), c);
898 
899  // server connection
900  if (!strcmp(c, "client_connect"))
901  {
902  if (cls.state == ca_connected)
903  {
904  Com_Printf ("Dup connect received. Ignored.\n");
905  return;
906  }
909  MSG_WriteString (&cls.netchan.message, "new");
911  return;
912  }
913 
914  // server responding to a status broadcast
915  if (!strcmp(c, "info"))
916  {
918  return;
919  }
920 
921  // remote command from gui front end
922  if (!strcmp(c, "cmd"))
923  {
925  {
926  Com_Printf ("Command packet from remote host. Ignored.\n");
927  return;
928  }
929  Sys_AppActivate ();
931  Cbuf_AddText (s);
932  Cbuf_AddText ("\n");
933  return;
934  }
935  // print command from somewhere
936  if (!strcmp(c, "print"))
937  {
939  Com_Printf ("%s", s);
940  return;
941  }
942 
943  // ping from somewhere
944  if (!strcmp(c, "ping"))
945  {
947  return;
948  }
949 
950  // challenge from the server we are connecting to
951  if (!strcmp(c, "challenge"))
952  {
953  cls.challenge = atoi(Cmd_Argv(1));
955  return;
956  }
957 
958  // echo request from server
959  if (!strcmp(c, "echo"))
960  {
962  return;
963  }
964 
965  Com_Printf ("Unknown command.\n");
966 }
967 
968 
969 /*
970 =================
971 CL_DumpPackets
972 
973 A vain attempt to help bad TCP stacks that cause problems
974 when they overflow
975 =================
976 */
977 void CL_DumpPackets (void)
978 {
980  {
981  Com_Printf ("dumnping a packet\n");
982  }
983 }
984 
985 /*
986 =================
987 CL_ReadPackets
988 =================
989 */
990 void CL_ReadPackets (void)
991 {
993  {
994 // Com_Printf ("packet\n");
995  //
996  // remote command packet
997  //
998  if (*(int *)net_message.data == -1)
999  {
1001  continue;
1002  }
1003 
1005  continue; // dump it if not connected
1006 
1007  if (net_message.cursize < 8)
1008  {
1009  Com_Printf ("%s: Runt packet\n",NET_AdrToString(net_from));
1010  continue;
1011  }
1012 
1013  //
1014  // packet from server
1015  //
1017  {
1018  Com_DPrintf ("%s:sequenced packet without connection\n"
1020  continue;
1021  }
1023  continue; // wasn't accepted for some reason
1025  }
1026 
1027  //
1028  // check timeout
1029  //
1030  if (cls.state >= ca_connected
1032  {
1033  if (++cl.timeoutcount > 5) // timeoutcount saves debugger
1034  {
1035  Com_Printf ("\nServer connection timed out.\n");
1036  CL_Disconnect ();
1037  return;
1038  }
1039  }
1040  else
1041  cl.timeoutcount = 0;
1042 
1043 }
1044 
1045 
1046 //=============================================================================
1047 
1048 /*
1049 ==============
1050 CL_FixUpGender_f
1051 ==============
1052 */
1053 void CL_FixUpGender(void)
1054 {
1055  char *p;
1056  char sk[80];
1057 
1058  if (gender_auto->value) {
1059 
1060  if (gender->modified) {
1061  // was set directly, don't override the user
1062  gender->modified = false;
1063  return;
1064  }
1065 
1066  strncpy(sk, skin->string, sizeof(sk) - 1);
1067  if ((p = strchr(sk, '/')) != NULL)
1068  *p = 0;
1069  if (Q_stricmp(sk, "male") == 0 || Q_stricmp(sk, "cyborg") == 0)
1070  Cvar_Set ("gender", "male");
1071  else if (Q_stricmp(sk, "female") == 0 || Q_stricmp(sk, "crackhor") == 0)
1072  Cvar_Set ("gender", "female");
1073  else
1074  Cvar_Set ("gender", "none");
1075  gender->modified = false;
1076  }
1077 }
1078 
1079 /*
1080 ==============
1081 CL_Userinfo_f
1082 ==============
1083 */
1084 void CL_Userinfo_f (void)
1085 {
1086  Com_Printf ("User info settings:\n");
1088 }
1089 
1090 /*
1091 =================
1092 CL_Snd_Restart_f
1093 
1094 Restart the sound subsystem so it can pick up
1095 new parameters and flush all sounds
1096 =================
1097 */
1098 void CL_Snd_Restart_f (void)
1099 {
1100  S_Shutdown ();
1101  S_Init ();
1102  CL_RegisterSounds ();
1103 }
1104 
1105 int precache_check; // for autodownload of precache items
1109 
1110 byte *precache_model; // used for skin checking in alias models
1111 
1112 #define PLAYER_MULT 5
1113 
1114 // ENV_CNT is map load, ENV_CNT+1 is first env map
1115 #define ENV_CNT (CS_PLAYERSKINS + MAX_CLIENTS * PLAYER_MULT)
1116 #define TEXTURE_CNT (ENV_CNT+13)
1117 
1118 static const char *env_suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
1119 
1121 {
1122  unsigned map_checksum; // for detecting cheater maps
1123  char fn[MAX_OSPATH];
1124  dmdl_t *pheader;
1125 
1126  if (cls.state != ca_connected)
1127  return;
1128 
1131 
1132 //ZOID
1133  if (precache_check == CS_MODELS) { // confirm map
1134  precache_check = CS_MODELS+2; // 0 isn't used
1137  return; // started a download
1138  }
1141  while (precache_check < CS_MODELS+MAX_MODELS &&
1143  if (cl.configstrings[precache_check][0] == '*' ||
1144  cl.configstrings[precache_check][0] == '#') {
1145  precache_check++;
1146  continue;
1147  }
1148  if (precache_model_skin == 0) {
1150  precache_model_skin = 1;
1151  return; // started a download
1152  }
1153  precache_model_skin = 1;
1154  }
1155 
1156  // checking for skins in the model
1157  if (!precache_model) {
1158 
1160  if (!precache_model) {
1161  precache_model_skin = 0;
1162  precache_check++;
1163  continue; // couldn't load it
1164  }
1165  if (LittleLong(*(unsigned *)precache_model) != IDALIASHEADER) {
1166  // not an alias model
1168  precache_model = 0;
1169  precache_model_skin = 0;
1170  precache_check++;
1171  continue;
1172  }
1173  pheader = (dmdl_t *)precache_model;
1174  if (LittleLong (pheader->version) != ALIAS_VERSION) {
1175  precache_check++;
1176  precache_model_skin = 0;
1177  continue; // couldn't load it
1178  }
1179  }
1180 
1181  pheader = (dmdl_t *)precache_model;
1182 
1183  while (precache_model_skin - 1 < LittleLong(pheader->num_skins)) {
1184  if (!CL_CheckOrDownloadFile((char *)precache_model +
1185  LittleLong(pheader->ofs_skins) +
1188  return; // started a download
1189  }
1191  }
1192  if (precache_model) {
1194  precache_model = 0;
1195  }
1196  precache_model_skin = 0;
1197  precache_check++;
1198  }
1199  }
1201  }
1204  if (precache_check == CS_SOUNDS)
1205  precache_check++; // zero is blank
1206  while (precache_check < CS_SOUNDS+MAX_SOUNDS &&
1208  if (cl.configstrings[precache_check][0] == '*') {
1209  precache_check++;
1210  continue;
1211  }
1212  Com_sprintf(fn, sizeof(fn), "sound/%s", cl.configstrings[precache_check++]);
1213  if (!CL_CheckOrDownloadFile(fn))
1214  return; // started a download
1215  }
1216  }
1218  }
1220  if (precache_check == CS_IMAGES)
1221  precache_check++; // zero is blank
1222  while (precache_check < CS_IMAGES+MAX_IMAGES &&
1224  Com_sprintf(fn, sizeof(fn), "pics/%s.pcx", cl.configstrings[precache_check++]);
1225  if (!CL_CheckOrDownloadFile(fn))
1226  return; // started a download
1227  }
1229  }
1230  // skins are special, since a player has three things to download:
1231  // model, weapon model and skin
1232  // so precache_check is now *3
1236  int i, n;
1237  char model[MAX_QPATH], skin[MAX_QPATH], *p;
1238 
1241 
1242  if (!cl.configstrings[CS_PLAYERSKINS+i][0]) {
1244  continue;
1245  }
1246 
1247  if ((p = strchr(cl.configstrings[CS_PLAYERSKINS+i], '\\')) != NULL)
1248  p++;
1249  else
1251  strcpy(model, p);
1252  p = strchr(model, '/');
1253  if (!p)
1254  p = strchr(model, '\\');
1255  if (p) {
1256  *p++ = 0;
1257  strcpy(skin, p);
1258  } else
1259  *skin = 0;
1260 
1261  switch (n) {
1262  case 0: // model
1263  Com_sprintf(fn, sizeof(fn), "players/%s/tris.md2", model);
1264  if (!CL_CheckOrDownloadFile(fn)) {
1266  return; // started a download
1267  }
1268  n++;
1269  /*FALL THROUGH*/
1270 
1271  case 1: // weapon model
1272  Com_sprintf(fn, sizeof(fn), "players/%s/weapon.md2", model);
1273  if (!CL_CheckOrDownloadFile(fn)) {
1275  return; // started a download
1276  }
1277  n++;
1278  /*FALL THROUGH*/
1279 
1280  case 2: // weapon skin
1281  Com_sprintf(fn, sizeof(fn), "players/%s/weapon.pcx", model);
1282  if (!CL_CheckOrDownloadFile(fn)) {
1284  return; // started a download
1285  }
1286  n++;
1287  /*FALL THROUGH*/
1288 
1289  case 3: // skin
1290  Com_sprintf(fn, sizeof(fn), "players/%s/%s.pcx", model, skin);
1291  if (!CL_CheckOrDownloadFile(fn)) {
1293  return; // started a download
1294  }
1295  n++;
1296  /*FALL THROUGH*/
1297 
1298  case 4: // skin_i
1299  Com_sprintf(fn, sizeof(fn), "players/%s/%s_i.pcx", model, skin);
1300  if (!CL_CheckOrDownloadFile(fn)) {
1302  return; // started a download
1303  }
1304  // move on to next model
1306  }
1307  }
1308  }
1309  // precache phase completed
1311  }
1312 
1313  if (precache_check == ENV_CNT) {
1314  precache_check = ENV_CNT + 1;
1315 
1316  CM_LoadMap (cl.configstrings[CS_MODELS+1], true, &map_checksum);
1317 
1318  if (map_checksum != atoi(cl.configstrings[CS_MAPCHECKSUM])) {
1319  Com_Error (ERR_DROP, "Local map version differs from server: %i != '%s'\n",
1320  map_checksum, cl.configstrings[CS_MAPCHECKSUM]);
1321  return;
1322  }
1323  }
1324 
1327  while (precache_check < TEXTURE_CNT) {
1328  int n = precache_check++ - ENV_CNT - 1;
1329 
1330  if (n & 1)
1331  Com_sprintf(fn, sizeof(fn), "env/%s%s.pcx",
1332  cl.configstrings[CS_SKY], env_suf[n/2]);
1333  else
1334  Com_sprintf(fn, sizeof(fn), "env/%s%s.tga",
1335  cl.configstrings[CS_SKY], env_suf[n/2]);
1336  if (!CL_CheckOrDownloadFile(fn))
1337  return; // started a download
1338  }
1339  }
1341  }
1342 
1343  if (precache_check == TEXTURE_CNT) {
1345  precache_tex = 0;
1346  }
1347 
1348  // confirm existance of textures, download any that don't exist
1349  if (precache_check == TEXTURE_CNT+1) {
1350  // from qcommon/cmodel.c
1351  extern int numtexinfo;
1352  extern mapsurface_t map_surfaces[];
1353 
1355  while (precache_tex < numtexinfo) {
1356  char fn[MAX_OSPATH];
1357 
1358  sprintf(fn, "textures/%s.wal", map_surfaces[precache_tex++].rname);
1359  if (!CL_CheckOrDownloadFile(fn))
1360  return; // started a download
1361  }
1362  }
1364  }
1365 
1366 //ZOID
1367  CL_RegisterSounds ();
1368  CL_PrepRefresh ();
1369 
1372 }
1373 
1374 /*
1375 =================
1376 CL_Precache_f
1377 
1378 The server will send this command right
1379 before allowing the client into the server
1380 =================
1381 */
1382 void CL_Precache_f (void)
1383 {
1384  //Yet another hack to let old demos work
1385  //the old precache sequence
1386  if (Cmd_Argc() < 2) {
1387  unsigned map_checksum; // for detecting cheater maps
1388 
1389  CM_LoadMap (cl.configstrings[CS_MODELS+1], true, &map_checksum);
1390  CL_RegisterSounds ();
1391  CL_PrepRefresh ();
1392  return;
1393  }
1394 
1396  precache_spawncount = atoi(Cmd_Argv(1));
1397  precache_model = 0;
1398  precache_model_skin = 0;
1399 
1401 }
1402 
1403 
1404 /*
1405 =================
1406 CL_InitLocal
1407 =================
1408 */
1409 void CL_InitLocal (void)
1410 {
1413 
1414  CL_InitInput ();
1415 
1416  adr0 = Cvar_Get( "adr0", "", CVAR_ARCHIVE );
1417  adr1 = Cvar_Get( "adr1", "", CVAR_ARCHIVE );
1418  adr2 = Cvar_Get( "adr2", "", CVAR_ARCHIVE );
1419  adr3 = Cvar_Get( "adr3", "", CVAR_ARCHIVE );
1420  adr4 = Cvar_Get( "adr4", "", CVAR_ARCHIVE );
1421  adr5 = Cvar_Get( "adr5", "", CVAR_ARCHIVE );
1422  adr6 = Cvar_Get( "adr6", "", CVAR_ARCHIVE );
1423  adr7 = Cvar_Get( "adr7", "", CVAR_ARCHIVE );
1424  adr8 = Cvar_Get( "adr8", "", CVAR_ARCHIVE );
1425 
1426 //
1427 // register our variables
1428 //
1429  cl_stereo_separation = Cvar_Get( "cl_stereo_separation", "0.4", CVAR_ARCHIVE );
1430  cl_stereo = Cvar_Get( "cl_stereo", "0", 0 );
1431 
1432  cl_add_blend = Cvar_Get ("cl_blend", "1", 0);
1433  cl_add_lights = Cvar_Get ("cl_lights", "1", 0);
1434  cl_add_particles = Cvar_Get ("cl_particles", "1", 0);
1435  cl_add_entities = Cvar_Get ("cl_entities", "1", 0);
1436  cl_gun = Cvar_Get ("cl_gun", "1", 0);
1437  cl_footsteps = Cvar_Get ("cl_footsteps", "1", 0);
1438  cl_noskins = Cvar_Get ("cl_noskins", "0", 0);
1439  cl_autoskins = Cvar_Get ("cl_autoskins", "0", 0);
1440  cl_predict = Cvar_Get ("cl_predict", "1", 0);
1441 // cl_minfps = Cvar_Get ("cl_minfps", "5", 0);
1442  cl_maxfps = Cvar_Get ("cl_maxfps", "90", 0);
1443 
1444  cl_upspeed = Cvar_Get ("cl_upspeed", "200", 0);
1445  cl_forwardspeed = Cvar_Get ("cl_forwardspeed", "200", 0);
1446  cl_sidespeed = Cvar_Get ("cl_sidespeed", "200", 0);
1447  cl_yawspeed = Cvar_Get ("cl_yawspeed", "140", 0);
1448  cl_pitchspeed = Cvar_Get ("cl_pitchspeed", "150", 0);
1449  cl_anglespeedkey = Cvar_Get ("cl_anglespeedkey", "1.5", 0);
1450 
1451  cl_run = Cvar_Get ("cl_run", "0", CVAR_ARCHIVE);
1452  freelook = Cvar_Get( "freelook", "0", CVAR_ARCHIVE );
1453  lookspring = Cvar_Get ("lookspring", "0", CVAR_ARCHIVE);
1454  lookstrafe = Cvar_Get ("lookstrafe", "0", CVAR_ARCHIVE);
1455  sensitivity = Cvar_Get ("sensitivity", "3", CVAR_ARCHIVE);
1456 
1457  m_pitch = Cvar_Get ("m_pitch", "0.022", CVAR_ARCHIVE);
1458  m_yaw = Cvar_Get ("m_yaw", "0.022", 0);
1459  m_forward = Cvar_Get ("m_forward", "1", 0);
1460  m_side = Cvar_Get ("m_side", "1", 0);
1461 
1462  cl_shownet = Cvar_Get ("cl_shownet", "0", 0);
1463  cl_showmiss = Cvar_Get ("cl_showmiss", "0", 0);
1464  cl_showclamp = Cvar_Get ("showclamp", "0", 0);
1465  cl_timeout = Cvar_Get ("cl_timeout", "120", 0);
1466  cl_paused = Cvar_Get ("paused", "0", 0);
1467  cl_timedemo = Cvar_Get ("timedemo", "0", 0);
1468 
1469  rcon_client_password = Cvar_Get ("rcon_password", "", 0);
1470  rcon_address = Cvar_Get ("rcon_address", "", 0);
1471 
1472  cl_lightlevel = Cvar_Get ("r_lightlevel", "0", 0);
1473 
1474  //
1475  // userinfo
1476  //
1477  info_password = Cvar_Get ("password", "", CVAR_USERINFO);
1478  info_spectator = Cvar_Get ("spectator", "0", CVAR_USERINFO);
1479  name = Cvar_Get ("name", "unnamed", CVAR_USERINFO | CVAR_ARCHIVE);
1480  skin = Cvar_Get ("skin", "male/grunt", CVAR_USERINFO | CVAR_ARCHIVE);
1481  rate = Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE); // FIXME
1482  msg = Cvar_Get ("msg", "1", CVAR_USERINFO | CVAR_ARCHIVE);
1483  hand = Cvar_Get ("hand", "0", CVAR_USERINFO | CVAR_ARCHIVE);
1484  fov = Cvar_Get ("fov", "90", CVAR_USERINFO | CVAR_ARCHIVE);
1485  gender = Cvar_Get ("gender", "male", CVAR_USERINFO | CVAR_ARCHIVE);
1486  gender_auto = Cvar_Get ("gender_auto", "1", CVAR_ARCHIVE);
1487  gender->modified = false; // clear this so we know when user sets it manually
1488 
1489  cl_vwep = Cvar_Get ("cl_vwep", "1", CVAR_ARCHIVE);
1490 
1491 
1492  //
1493  // register our commands
1494  //
1496  Cmd_AddCommand ("pause", CL_Pause_f);
1497  Cmd_AddCommand ("pingservers", CL_PingServers_f);
1498  Cmd_AddCommand ("skins", CL_Skins_f);
1499 
1500  Cmd_AddCommand ("userinfo", CL_Userinfo_f);
1501  Cmd_AddCommand ("snd_restart", CL_Snd_Restart_f);
1502 
1503  Cmd_AddCommand ("changing", CL_Changing_f);
1504  Cmd_AddCommand ("disconnect", CL_Disconnect_f);
1505  Cmd_AddCommand ("record", CL_Record_f);
1506  Cmd_AddCommand ("stop", CL_Stop_f);
1507 
1508  Cmd_AddCommand ("quit", CL_Quit_f);
1509 
1510  Cmd_AddCommand ("connect", CL_Connect_f);
1511  Cmd_AddCommand ("reconnect", CL_Reconnect_f);
1512 
1513  Cmd_AddCommand ("rcon", CL_Rcon_f);
1514 
1515 // Cmd_AddCommand ("packet", CL_Packet_f); // this is dangerous to leave in
1516 
1517  Cmd_AddCommand ("setenv", CL_Setenv_f );
1518 
1519  Cmd_AddCommand ("precache", CL_Precache_f);
1520 
1521  Cmd_AddCommand ("download", CL_Download_f);
1522 
1523  //
1524  // forward to server commands
1525  //
1526  // the only thing this does is allow command completion
1527  // to work -- all unknown commands are automatically
1528  // forwarded to the server
1529  Cmd_AddCommand ("wave", NULL);
1530  Cmd_AddCommand ("inven", NULL);
1531  Cmd_AddCommand ("kill", NULL);
1532  Cmd_AddCommand ("use", NULL);
1533  Cmd_AddCommand ("drop", NULL);
1534  Cmd_AddCommand ("say", NULL);
1535  Cmd_AddCommand ("say_team", NULL);
1536  Cmd_AddCommand ("info", NULL);
1537  Cmd_AddCommand ("prog", NULL);
1538  Cmd_AddCommand ("give", NULL);
1539  Cmd_AddCommand ("god", NULL);
1540  Cmd_AddCommand ("notarget", NULL);
1541  Cmd_AddCommand ("noclip", NULL);
1542  Cmd_AddCommand ("invuse", NULL);
1543  Cmd_AddCommand ("invprev", NULL);
1544  Cmd_AddCommand ("invnext", NULL);
1545  Cmd_AddCommand ("invdrop", NULL);
1546  Cmd_AddCommand ("weapnext", NULL);
1547  Cmd_AddCommand ("weapprev", NULL);
1548  Cmd_AddCommand ("weaplast", NULL);
1549 }
1550 
1551 
1552 
1553 /*
1554 ===============
1555 CL_WriteConfiguration
1556 
1557 Writes key bindings and archived cvars to config.cfg
1558 ===============
1559 */
1561 {
1562  FILE *f;
1563  char path[MAX_QPATH];
1564 
1565  if (cls.state == ca_uninitialized)
1566  return;
1567 
1568  Com_sprintf (path, sizeof(path),"%s/config.cfg",FS_Gamedir());
1569  f = fopen (path, "w");
1570  if (!f)
1571  {
1572  Com_Printf ("Couldn't write config.cfg.\n");
1573  return;
1574  }
1575 
1576  fprintf (f, "// generated by quake, do not modify\n");
1577  Key_WriteBindings (f);
1578  fclose (f);
1579 
1580  Cvar_WriteVariables (path);
1581 }
1582 
1583 
1584 /*
1585 ==================
1586 CL_FixCvarCheats
1587 
1588 ==================
1589 */
1590 
1591 typedef struct
1592 {
1593  char *name;
1594  char *value;
1596 } cheatvar_t;
1597 
1599  {"timescale", "1"},
1600  {"timedemo", "0"},
1601  {"r_drawworld", "1"},
1602  {"cl_testlights", "0"},
1603  {"r_fullbright", "0"},
1604  {"r_drawflat", "0"},
1605  {"paused", "0"},
1606  {"fixedtime", "0"},
1607  {"sw_draworder", "0"},
1608  {"gl_lightmap", "0"},
1609  {"gl_saturatelighting", "0"},
1610  {NULL, NULL}
1611 };
1612 
1614 
1615 void CL_FixCvarCheats (void)
1616 {
1617  int i;
1618  cheatvar_t *var;
1619 
1620  if ( !strcmp(cl.configstrings[CS_MAXCLIENTS], "1")
1621  || !cl.configstrings[CS_MAXCLIENTS][0] )
1622  return; // single player can cheat
1623 
1624  // find all the cvars if we haven't done it yet
1625  if (!numcheatvars)
1626  {
1627  while (cheatvars[numcheatvars].name)
1628  {
1631  numcheatvars++;
1632  }
1633  }
1634 
1635  // make sure they are all set to the proper values
1636  for (i=0, var = cheatvars ; i<numcheatvars ; i++, var++)
1637  {
1638  if ( strcmp (var->var->string, var->value) )
1639  {
1640  Cvar_Set (var->name, var->value);
1641  }
1642  }
1643 }
1644 
1645 //============================================================================
1646 
1647 /*
1648 ==================
1649 CL_SendCommand
1650 
1651 ==================
1652 */
1653 void CL_SendCommand (void)
1654 {
1655  // get new key events
1656  Sys_SendKeyEvents ();
1657 
1658  // allow mice or other external controllers to add commands
1659  IN_Commands ();
1660 
1661  // process console commands
1662  Cbuf_Execute ();
1663 
1664  // fix any cheating cvars
1665  CL_FixCvarCheats ();
1666 
1667  // send intentions now
1668  CL_SendCmd ();
1669 
1670  // resend a connection request if necessary
1671  CL_CheckForResend ();
1672 }
1673 
1674 
1675 /*
1676 ==================
1677 CL_Frame
1678 
1679 ==================
1680 */
1681 void CL_Frame (int msec)
1682 {
1683  static int extratime;
1684  static int lasttimecalled;
1685 
1686  if (dedicated->value)
1687  return;
1688 
1689  extratime += msec;
1690 
1691  if (!cl_timedemo->value)
1692  {
1693  if (cls.state == ca_connected && extratime < 100)
1694  return; // don't flood packets out while connecting
1695  if (extratime < 1000/cl_maxfps->value)
1696  return; // framerate is too high
1697  }
1698 
1699  // let the mouse activate or deactivate
1700  IN_Frame ();
1701 
1702  // decide the simulation time
1703  cls.frametime = extratime/1000.0;
1704  cl.time += extratime;
1705  cls.realtime = curtime;
1706 
1707  extratime = 0;
1708 #if 0
1709  if (cls.frametime > (1.0 / cl_minfps->value))
1710  cls.frametime = (1.0 / cl_minfps->value);
1711 #else
1712  if (cls.frametime > (1.0 / 5))
1713  cls.frametime = (1.0 / 5);
1714 #endif
1715 
1716  // if in the debugger last frame, don't timeout
1717  if (msec > 5000)
1719 
1720  // fetch results from server
1721  CL_ReadPackets ();
1722 
1723  // send a new command message to the server
1724  CL_SendCommand ();
1725 
1726  // predict all unacknowledged movements
1727  CL_PredictMovement ();
1728 
1729  // allow rendering DLL change
1730  VID_CheckChanges ();
1731  if (!cl.refresh_prepped && cls.state == ca_active)
1732  CL_PrepRefresh ();
1733 
1734  // update the screen
1735  if (host_speeds->value)
1737  SCR_UpdateScreen ();
1738  if (host_speeds->value)
1740 
1741  // update audio
1743 
1744  CDAudio_Update();
1745  Miniaudio_Update();
1746 
1747  // advance local effects for next frame
1748  CL_RunDLights ();
1749  CL_RunLightStyles ();
1750  SCR_RunCinematic ();
1751  SCR_RunConsole ();
1752 
1753  cls.framecount++;
1754 
1755  if ( log_stats->value )
1756  {
1757  if ( cls.state == ca_active )
1758  {
1759  if ( !lasttimecalled )
1760  {
1761  lasttimecalled = Sys_Milliseconds();
1762  if ( log_stats_file )
1763  fprintf( log_stats_file, "0\n" );
1764  }
1765  else
1766  {
1767  int now = Sys_Milliseconds();
1768 
1769  if ( log_stats_file )
1770  fprintf( log_stats_file, "%d\n", now - lasttimecalled );
1771  lasttimecalled = now;
1772  }
1773  }
1774  }
1775 }
1776 
1777 
1778 //============================================================================
1779 
1780 /*
1781 ====================
1782 CL_Init
1783 ====================
1784 */
1785 void CL_Init (void)
1786 {
1787  if (dedicated->value)
1788  return; // nothing running on the client
1789 
1790  // all archived variables will now be loaded
1791 
1792  Con_Init ();
1793 #if defined __linux__ || defined __sgi
1794  S_Init ();
1795  VID_Init ();
1796 #else
1797  VID_Init ();
1798  S_Init (); // sound must be initialized after window is created
1799 #endif
1800 
1801  V_Init ();
1802 
1805 
1806  M_Init ();
1807 
1808  SCR_Init ();
1809  cls.disable_screen = true; // don't draw yet
1810 
1811  CDAudio_Init ();
1812  Miniaudio_Init ();
1813  CL_InitLocal ();
1814  IN_Init ();
1815 
1816 // Cbuf_AddText ("exec autoexec.cfg\n");
1817  FS_ExecAutoexec ();
1818  Cbuf_Execute ();
1819 
1820 }
1821 
1822 
1823 /*
1824 ===============
1825 CL_Shutdown
1826 
1827 FIXME: this is a callback from Sys_Quit and Com_Error. It would be better
1828 to run quit through here before the final handoff to the sys code.
1829 ===============
1830 */
1831 void CL_Shutdown(void)
1832 {
1833  static qboolean isdown = false;
1834 
1835  if (isdown)
1836  {
1837  printf ("recursive shutdown\n");
1838  return;
1839  }
1840  isdown = true;
1841 
1843 
1844  CDAudio_Shutdown ();
1846  S_Shutdown();
1847  IN_Shutdown ();
1848  VID_Shutdown();
1849 }
1850 
1851 
sensitivity
cvar_t * sensitivity
Definition: cl_main.c:65
adr4
cvar_t * adr4
Definition: cl_main.c:30
CL_InitLocal
void CL_InitLocal(void)
Definition: cl_main.c:1409
CS_MAXCLIENTS
#define CS_MAXCLIENTS
Definition: q_shared.h:1109
CL_Record_f
void CL_Record_f(void)
Definition: cl_main.c:162
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:86
CL_Setenv_f
void CL_Setenv_f(void)
Definition: cl_main.c:306
refdef_t::vieworg
float vieworg[3]
Definition: ref.h:106
cl_paused
cvar_t * cl_paused
Definition: cl_main.c:60
SCR_EndLoadingPlaque
void SCR_EndLoadingPlaque(void)
Definition: cl_scrn.c:590
numcheatvars
int numcheatvars
Definition: cl_main.c:1613
dedicated
cvar_t * dedicated
Definition: common.c:47
curtime
int curtime
Definition: q_shwin.c:119
client_static_t::challenge
int challenge
Definition: client.h:227
sizebuf_s
Definition: qcommon.h:92
value
GLfloat value
Definition: qgl_win.c:63
gender
cvar_t * gender
Definition: cl_main.c:85
adr8
cvar_t * adr8
Definition: cl_main.c:34
CS_SKY
#define CS_SKY
Definition: q_shared.h:1103
rcon_address
cvar_t * rcon_address
Definition: cl_main.c:40
client_state_t::servercount
int servercount
Definition: client.h:154
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:80
MAX_MODELS
#define MAX_MODELS
Definition: q_shared.h:89
BigShort
short BigShort(short l)
Definition: q_shared.c:945
CS_SOUNDS
#define CS_SOUNDS
Definition: q_shared.h:1113
allow_download
cvar_t * allow_download
Definition: sv_main.c:37
adr6
cvar_t * adr6
Definition: cl_main.c:32
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
CL_ParseClientinfo
void CL_ParseClientinfo(int player)
Definition: cl_parse.c:501
CDAudio_Update
void CDAudio_Update(void)
Definition: cd_win.c:419
V_Init
void V_Init(void)
Definition: cl_view.c:579
log_stats
cvar_t * log_stats
Definition: common.c:41
CVAR_NOSET
#define CVAR_NOSET
Definition: q_shared.h:319
client_state_t::v_forward
vec3_t v_forward
Definition: client.h:133
Key_WriteBindings
void Key_WriteBindings(FILE *f)
Definition: keys.c:616
adr2
cvar_t * adr2
Definition: cl_main.c:28
CL_RegisterSounds
void CL_RegisterSounds(void)
Definition: cl_parse.c:176
cl_autoskins
cvar_t * cl_autoskins
Definition: cl_main.c:43
client_static_t::disable_screen
float disable_screen
Definition: client.h:212
cl_lightlevel
cvar_t * cl_lightlevel
Definition: cl_main.c:72
CL_Shutdown
void CL_Shutdown(void)
Definition: cl_main.c:1831
adr0
cvar_t * adr0
Definition: cl_main.c:26
ca_disconnected
@ ca_disconnected
Definition: client.h:186
mapsurface_s
Definition: q_shared.h:446
CL_CheckOrDownloadFile
qboolean CL_CheckOrDownloadFile(char *filename)
Definition: cl_parse.c:69
cl_run
cvar_t * cl_run
Definition: cl_input.c:230
client_state_t::v_up
vec3_t v_up
Definition: client.h:133
CL_PingServers_f
void CL_PingServers_f(void)
Definition: cl_main.c:802
cl_add_blend
cvar_t * cl_add_blend
Definition: cl_main.c:54
CL_WriteDemoMessage
void CL_WriteDemoMessage(void)
Definition: cl_main.c:115
map_surfaces
mapsurface_t map_surfaces[MAX_MAP_TEXINFO]
Definition: cmodel.c:69
net_message
sizebuf_t net_message
Definition: net_chan.c:82
fov
cvar_t * fov
Definition: cl_main.c:82
entity_state_s
Definition: q_shared.h:1145
cl_shownet
cvar_t * cl_shownet
Definition: cl_main.c:56
precache_model_skin
int precache_model_skin
Definition: cl_main.c:1108
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
precache_tex
int precache_tex
Definition: cl_main.c:1107
client_state_t::timeoutcount
int timeoutcount
Definition: client.h:93
netchan_t::message
sizebuf_t message
Definition: qcommon.h:608
CL_SendCmd
void CL_SendCmd(void)
Definition: cl_input.c:460
ca_uninitialized
@ ca_uninitialized
Definition: client.h:185
cl_upspeed
cvar_t * cl_upspeed
Definition: cl_input.c:223
ca_connecting
@ ca_connecting
Definition: client.h:187
net_from
netadr_t net_from
Definition: net_chan.c:81
Cvar_Userinfo
char * Cvar_Userinfo(void)
Definition: cvar.c:504
allow_download_maps
cvar_t * allow_download_maps
Definition: sv_main.c:41
m_side
cvar_t * m_side
Definition: cl_main.c:70
cvar_s::string
char * string
Definition: q_shared.h:327
CS_MODELS
#define CS_MODELS
Definition: q_shared.h:1112
qboolean
qboolean
Definition: q_shared.h:63
rcon_client_password
cvar_t * rcon_client_password
Definition: cl_main.c:39
client_static_t::disable_servercount
int disable_servercount
Definition: client.h:215
cl_sidespeed
cvar_t * cl_sidespeed
Definition: cl_input.c:225
cheatvar_t::value
char * value
Definition: cl_main.c:1594
VectorClear
#define VectorClear(a)
Definition: q_shared.h:166
i
int i
Definition: q_shared.c:305
Miniaudio_Shutdown
void Miniaudio_Shutdown(void)
Definition: snd_miniaudio.c:352
host_speeds
cvar_t * host_speeds
Definition: common.c:40
cheatvars
cheatvar_t cheatvars[]
Definition: cl_main.c:1598
client_static_t::demorecording
qboolean demorecording
Definition: client.h:237
ca_active
@ ca_active
Definition: client.h:189
client_state_t::gamedir
char gamedir[MAX_QPATH]
Definition: client.h:155
Cvar_WriteVariables
void Cvar_WriteVariables(char *path)
Definition: cvar.c:429
buffer
GLenum GLfloat * buffer
Definition: qgl_win.c:151
m_forward
cvar_t * m_forward
Definition: cl_main.c:69
precache_model
byte * precache_model
Definition: cl_main.c:1110
MSG_WriteLong
void MSG_WriteLong(sizebuf_t *sb, int c)
Definition: common.c:330
NET_AdrToString
char * NET_AdrToString(netadr_t a)
Definition: net_wins.c:161
CL_PredictMovement
void CL_PredictMovement(void)
Definition: cl_pred.c:199
CL_ReadPackets
void CL_ReadPackets(void)
Definition: cl_main.c:990
SZ_Init
void SZ_Init(sizebuf_t *buf, byte *data, int length)
Definition: common.c:885
argc
int argc
Definition: sys_win.c:55
CL_Init
void CL_Init(void)
Definition: cl_main.c:1785
CS_NAME
#define CS_NAME
Definition: q_shared.h:1101
CL_Disconnect
void CL_Disconnect(void)
Definition: cl_main.c:618
Cmd_Args
char * Cmd_Args(void)
Definition: cmd.c:531
sizebuf_s::data
byte * data
Definition: qcommon.h:96
client_state_t::refdef
refdef_t refdef
Definition: client.h:131
centity_t::baseline
entity_state_t baseline
Definition: client.h:57
cl_timeout
cvar_t * cl_timeout
Definition: cl_main.c:45
NA_BROADCAST
@ NA_BROADCAST
Definition: qcommon.h:547
cl_gun
cvar_t * cl_gun
Definition: cl_main.c:49
SCR_BeginLoadingPlaque
void SCR_BeginLoadingPlaque(void)
Definition: cl_scrn.c:562
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
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
cl_yawspeed
cvar_t * cl_yawspeed
Definition: cl_input.c:227
SZ_Clear
void SZ_Clear(sizebuf_t *buf)
Definition: common.c:892
PLAYER_MULT
#define PLAYER_MULT
Definition: cl_main.c:1112
precache_spawncount
int precache_spawncount
Definition: cl_main.c:1106
freelook
cvar_t * freelook
Definition: cl_main.c:24
CL_InitInput
void CL_InitInput(void)
Definition: cl_input.c:414
Cmd_TokenizeString
void Cmd_TokenizeString(char *text, qboolean macroExpand)
Definition: cmd.c:620
client_static_t
Definition: client.h:202
NET_StringToAdr
qboolean NET_StringToAdr(char *s, netadr_t *a)
Definition: net_wins.c:262
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
va
char * va(char *format,...)
Definition: q_shared.c:1050
CL_Connect_f
void CL_Connect_f(void)
Definition: cl_main.c:496
msg
cvar_t * msg
Definition: cl_main.c:83
sizebuf_s::maxsize
int maxsize
Definition: qcommon.h:97
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
adr7
cvar_t * adr7
Definition: cl_main.c:33
client_state_t::timedemo_start
int timedemo_start
Definition: client.h:96
CS_IMAGES
#define CS_IMAGES
Definition: q_shared.h:1114
CL_ForwardToServer_f
void CL_ForwardToServer_f(void)
Definition: cl_main.c:347
SCR_RunConsole
void SCR_RunConsole(void)
Definition: cl_scrn.c:498
SCR_UpdateScreen
void SCR_UpdateScreen(void)
Definition: cl_scrn.c:1215
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
CL_Precache_f
void CL_Precache_f(void)
Definition: cl_main.c:1382
adr1
cvar_t * adr1
Definition: cl_main.c:27
userinfo_modified
qboolean userinfo_modified
Definition: cvar.c:485
cl_showmiss
cvar_t * cl_showmiss
Definition: cl_main.c:57
Info_Print
void Info_Print(char *s)
Definition: common.c:1049
skin
cvar_t * skin
Definition: cl_main.c:80
CS_MAPCHECKSUM
#define CS_MAPCHECKSUM
Definition: q_shared.h:1110
CL_SendConnectPacket
void CL_SendConnectPacket(void)
Definition: cl_main.c:422
cl_add_lights
cvar_t * cl_add_lights
Definition: cl_main.c:52
CL_Snd_Restart_f
void CL_Snd_Restart_f(void)
Definition: cl_main.c:1098
CL_Disconnect_f
void CL_Disconnect_f(void)
Definition: cl_main.c:665
cl_forwardspeed
cvar_t * cl_forwardspeed
Definition: cl_input.c:224
cl_add_entities
cvar_t * cl_add_entities
Definition: cl_main.c:53
LittleLong
int LittleLong(int l)
Definition: q_shared.c:948
centity_t
Definition: client.h:55
client_static_t::demowaiting
qboolean demowaiting
Definition: client.h:238
CL_RunDLights
void CL_RunDLights(void)
Definition: cl_fx.c:211
CL_Userinfo_f
void CL_Userinfo_f(void)
Definition: cl_main.c:1084
SV_ShutdownGameProgs
void SV_ShutdownGameProgs(void)
Definition: sv_game.c:305
CL_ClearState
void CL_ClearState(void)
Definition: cl_main.c:595
NET_SendPacket
void NET_SendPacket(netsrc_t sock, int length, void *data, netadr_t to)
Definition: net_wins.c:400
cheatvar_t
Definition: cl_main.c:1591
gender_auto
cvar_t * gender_auto
Definition: cl_main.c:86
client_static_t::servername
char servername[MAX_OSPATH]
Definition: client.h:219
M_Init
void M_Init(void)
Definition: menu.c:3973
IN_Frame
void IN_Frame(void)
Definition: in_win.c:413
CL_PrepRefresh
void CL_PrepRefresh(void)
Definition: cl_view.c:250
ENV_CNT
#define ENV_CNT
Definition: cl_main.c:1115
CL_RunLightStyles
void CL_RunLightStyles(void)
Definition: cl_fx.c:66
CL_Download_f
void CL_Download_f(void)
Definition: cl_parse.c:132
dmdl_t::version
int version
Definition: qfiles.h:140
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:406
CL_WriteConfiguration
void CL_WriteConfiguration(void)
Definition: cl_main.c:1560
cl_footsteps
cvar_t * cl_footsteps
Definition: cl_main.c:44
client_static_t::connect_time
float connect_time
Definition: client.h:220
FS_ExecAutoexec
void FS_ExecAutoexec(void)
Definition: files.c:572
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:98
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1117
dmdl_t::num_skins
int num_skins
Definition: qfiles.h:146
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:398
PROTOCOL_VERSION
#define PROTOCOL_VERSION
Definition: qcommon.h:197
m_yaw
cvar_t * m_yaw
Definition: cl_main.c:68
CDAudio_Shutdown
void CDAudio_Shutdown(void)
Definition: cd_win.c:487
lookspring
cvar_t * lookspring
Definition: cl_main.c:63
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:316
cl_stereo_separation
cvar_t * cl_stereo_separation
Definition: cl_main.c:36
lookstrafe
cvar_t * lookstrafe
Definition: cl_main.c:64
S_Shutdown
void S_Shutdown(void)
Definition: snd_dma.c:164
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
cvar_s::value
float value
Definition: q_shared.h:331
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
allow_download_players
cvar_t * allow_download_players
Definition: sv_main.c:38
time_before_ref
int time_before_ref
Definition: common.c:56
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:81
CL_ParseStatusMessage
void CL_ParseStatusMessage(void)
Definition: cl_main.c:786
client_state_t::timedemo_frames
int timedemo_frames
Definition: client.h:95
cl_add_particles
cvar_t * cl_add_particles
Definition: cl_main.c:51
refdef_t::blend
float blend[4]
Definition: ref.h:108
Sys_AppActivate
void Sys_AppActivate(void)
Definition: sys_win.c:467
MSG_WriteString
void MSG_WriteString(sizebuf_t *sb, char *s)
Definition: common.c:356
NULL
#define NULL
Definition: q_shared.h:67
CL_Pause_f
void CL_Pause_f(void)
Definition: cl_main.c:369
refexport_t::CinematicSetPalette
void(* CinematicSetPalette)(const unsigned char *palette)
Definition: ref.h:180
MSG_WriteShort
void MSG_WriteShort(sizebuf_t *sb, int c)
Definition: common.c:316
cl_vwep
cvar_t * cl_vwep
Definition: cl_main.c:88
noudp
static cvar_t * noudp
Definition: net_wins.c:43
MSG_WriteByte
void MSG_WriteByte(sizebuf_t *sb, int c)
Definition: common.c:303
MSG_ReadStringLine
char * MSG_ReadStringLine(sizebuf_t *msg_read)
Definition: common.c:793
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:181
client_state_t::playernum
int playernum
Definition: client.h:156
CL_ConnectionlessPacket
void CL_ConnectionlessPacket(void)
Definition: cl_main.c:883
CL_ParseServerMessage
void CL_ParseServerMessage(void)
Definition: cl_parse.c:661
CL_ClearTEnts
void CL_ClearTEnts(void)
Definition: cl_tent.c:213
Netchan_Process
qboolean Netchan_Process(netchan_t *chan, sizebuf_t *msg)
Definition: net_chan.c:298
client_state_t::time
int time
Definition: client.h:127
CL_Rcon_f
void CL_Rcon_f(void)
Definition: cl_main.c:536
cl_showclamp
cvar_t * cl_showclamp
Definition: cl_main.c:58
allow_download_models
cvar_t * allow_download_models
Definition: sv_main.c:39
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:744
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1180
IN_Commands
void IN_Commands(void)
Definition: in_win.c:649
VID_Init
void VID_Init(void)
Definition: vid_dll.c:745
MSG_WriteChar
void MSG_WriteChar(sizebuf_t *sb, int c)
Definition: common.c:290
adr3
cvar_t * adr3
Definition: cl_main.c:29
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:1119
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
NET_Config
void NET_Config(qboolean multiplayer)
Definition: net_wins.c:695
netchan_t::remote_address
netadr_t remote_address
Definition: qcommon.h:593
CL_ClearEffects
void CL_ClearEffects(void)
Definition: cl_fx.c:2301
CL_FixUpGender
void CL_FixUpGender(void)
Definition: cl_main.c:1053
precache_check
int precache_check
Definition: cl_main.c:1105
CL_CheckForResend
void CL_CheckForResend(void)
Definition: cl_main.c:450
Netchan_Setup
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
Definition: net_chan.c:152
s
static fixed16_t s
Definition: r_scan.c:30
cl_stereo
cvar_t * cl_stereo
Definition: cl_main.c:37
MAX_MSGLEN
#define MAX_MSGLEN
Definition: qcommon.h:544
netadr_t::type
netadrtype_t type
Definition: qcommon.h:553
Con_Init
void Con_Init(void)
Definition: console.c:305
CL_Stop_f
void CL_Stop_f(void)
Definition: cl_main.c:134
SV_Shutdown
void SV_Shutdown(char *finalmsg, qboolean reconnect)
Definition: sv_main.c:1035
re
refexport_t re
Definition: vid_dll.c:32
MAX_PARSE_ENTITIES
#define MAX_PARSE_ENTITIES
Definition: client.h:312
client_static_t::demofile
FILE * demofile
Definition: client.h:239
client_state_t::v_right
vec3_t v_right
Definition: client.h:133
cl_parse_entities
entity_state_t cl_parse_entities[MAX_PARSE_ENTITIES]
Definition: cl_main.c:95
info_password
cvar_t * info_password
Definition: cl_main.c:77
rate
cvar_t * rate
Definition: cl_main.c:81
NET_IsLocalAddress
qboolean NET_IsLocalAddress(netadr_t adr)
Definition: net_wins.c:282
CM_LoadMap
cmodel_t * CM_LoadMap(char *name, qboolean clientload, unsigned *checksum)
Definition: cmodel.c:548
client_static_t::download
FILE * download
Definition: client.h:229
cl_maxfps
cvar_t * cl_maxfps
Definition: cl_main.c:48
IN_Shutdown
void IN_Shutdown(void)
Definition: in_win.c:384
m_pitch
cvar_t * m_pitch
Definition: cl_main.c:67
MSG_ReadLong
int MSG_ReadLong(sizebuf_t *msg_read)
Definition: common.c:731
client_static_t::framecount
int framecount
Definition: client.h:207
adr5
cvar_t * adr5
Definition: cl_main.c:31
CL_Skins_f
void CL_Skins_f(void)
Definition: cl_main.c:860
CL_Reconnect_f
void CL_Reconnect_f(void)
Definition: cl_main.c:751
VID_CheckChanges
void VID_CheckChanges(void)
Definition: vid_dll.c:677
cheatvar_t::var
cvar_t * var
Definition: cl_main.c:1595
client_static_t::state
connstate_t state
Definition: client.h:204
NS_CLIENT
@ NS_CLIENT
Definition: qcommon.h:549
MSG_ReadString
char * MSG_ReadString(sizebuf_t *msg_read)
Definition: common.c:773
NET_GetPacket
qboolean NET_GetPacket(netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
Definition: net_wins.c:336
netchan_t::last_received
int last_received
Definition: qcommon.h:590
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:559
svc_configstring
@ svc_configstring
Definition: qcommon.h:239
cl_anglespeedkey
cvar_t * cl_anglespeedkey
Definition: cl_input.c:232
CL_FixCvarCheats
void CL_FixCvarCheats(void)
Definition: cl_main.c:1615
cl_timedemo
cvar_t * cl_timedemo
Definition: cl_main.c:61
CL_Packet_f
void CL_Packet_f(void)
Definition: cl_main.c:680
netadr_t::port
unsigned short port
Definition: qcommon.h:558
CDAudio_Init
int CDAudio_Init(void)
Definition: cd_win.c:437
cl_pitchspeed
cvar_t * cl_pitchspeed
Definition: cl_input.c:228
client_static_t::frametime
float frametime
Definition: client.h:209
Com_ServerState
int Com_ServerState(void)
Definition: common.c:256
CVAR_USERINFO
#define CVAR_USERINFO
Definition: q_shared.h:317
MAX_SOUNDS
#define MAX_SOUNDS
Definition: q_shared.h:90
Cbuf_Execute
void Cbuf_Execute(void)
Definition: cmd.c:194
info_spectator
cvar_t * info_spectator
Definition: cl_main.c:78
NA_BROADCAST_IPX
@ NA_BROADCAST_IPX
Definition: qcommon.h:547
log_stats_file
FILE * log_stats_file
Definition: common.c:38
cl_predict
cvar_t * cl_predict
Definition: cl_main.c:46
MAX_SKINNAME
#define MAX_SKINNAME
Definition: qfiles.h:93
Com_Quit
void Com_Quit(void)
Definition: common.c:235
IN_Init
void IN_Init(void)
Definition: in_win.c:339
env_suf
static const char * env_suf[6]
Definition: cl_main.c:1118
entity_state_s::modelindex
int modelindex
Definition: q_shared.h:1152
time_after_ref
int time_after_ref
Definition: common.c:57
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:158
Netchan_Transmit
void Netchan_Transmit(netchan_t *chan, int length, byte *data)
Definition: net_chan.c:213
net_message_buffer
byte net_message_buffer[MAX_MSGLEN]
Definition: net_chan.c:83
sizebuf_s::cursize
int cursize
Definition: qcommon.h:98
SCR_RunCinematic
void SCR_RunCinematic(void)
Definition: cl_cin.c:490
Netchan_OutOfBandPrint
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
Definition: net_chan.c:132
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
dmdl_t::ofs_skins
int ofs_skins
Definition: qfiles.h:153
Com_DPrintf
void Com_DPrintf(char *fmt,...)
Definition: common.c:157
netadr_t
Definition: qcommon.h:551
S_StopAllSounds
void S_StopAllSounds(void)
Definition: snd_dma.c:785
Miniaudio_Update
void Miniaudio_Update(void)
Definition: snd_miniaudio.c:299
FS_FreeFile
void FS_FreeFile(void *buffer)
Definition: files.c:437
SCR_Init
void SCR_Init(void)
Definition: cl_scrn.c:410
VID_Shutdown
void VID_Shutdown(void)
Definition: vid_dll.c:774
ca_connected
@ ca_connected
Definition: client.h:188
ALIAS_VERSION
#define ALIAS_VERSION
Definition: qfiles.h:87
M_AddToServerList
void M_AddToServerList(netadr_t adr, char *info)
Definition: menu.c:2239
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:104
CL_Changing_f
void CL_Changing_f(void)
Definition: cl_main.c:731
NET_CompareAdr
qboolean NET_CompareAdr(netadr_t a, netadr_t b)
Definition: net_wins.c:104
CL_Frame
void CL_Frame(int msec)
Definition: cl_main.c:1681
CL_Quit_f
void CL_Quit_f(void)
Definition: cl_main.c:386
svc_spawnbaseline
@ svc_spawnbaseline
Definition: qcommon.h:240
Sys_Milliseconds
int Sys_Milliseconds(void)
Definition: q_shwin.c:120
clc_stringcmd
@ clc_stringcmd
Definition: qcommon.h:260
IDALIASHEADER
#define IDALIASHEADER
Definition: qfiles.h:86
cls
client_static_t cls
Definition: cl_main.c:90
CL_Drop
void CL_Drop(void)
Definition: cl_main.c:399
TEXTURE_CNT
#define TEXTURE_CNT
Definition: cl_main.c:1116
allow_download_sounds
cvar_t * allow_download_sounds
Definition: sv_main.c:40
Cvar_VariableString
char * Cvar_VariableString(char *var_name)
Definition: cvar.c:79
MSG_WriteDeltaEntity
void MSG_WriteDeltaEntity(entity_state_t *from, entity_state_t *to, sizebuf_t *msg, qboolean force, qboolean newentity)
Definition: common.c:483
hand
cvar_t * hand
Definition: cl_main.c:84
Miniaudio_Init
void Miniaudio_Init(void)
Definition: snd_miniaudio.c:195
client_state_t
Definition: client.h:91
noipx
static cvar_t * noipx
Definition: net_wins.c:44
CL_DumpPackets
void CL_DumpPackets(void)
Definition: cl_main.c:977
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
M_ForceMenuOff
void M_ForceMenuOff(void)
Definition: menu.c:123
PORT_SERVER
#define PORT_SERVER
Definition: qcommon.h:203
MSG_BeginReading
void MSG_BeginReading(sizebuf_t *msg)
Definition: common.c:684
MAX_IMAGES
#define MAX_IMAGES
Definition: q_shared.h:91
CL_SendCommand
void CL_SendCommand(void)
Definition: cl_main.c:1653
S_Init
void S_Init(void)
Definition: snd_dma.c:116
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
S_Update
void S_Update(vec3_t origin, vec3_t forward, vec3_t right, vec3_t up)
Definition: snd_dma.c:1009
client.h
numtexinfo
int numtexinfo
Definition: cmodel.c:68
dmdl_t
Definition: qfiles.h:137
client_static_t::quakePort
int quakePort
Definition: client.h:222
Cmd_ForwardToServer
void Cmd_ForwardToServer(void)
Definition: cl_main.c:286
SCR_StopCinematic
void SCR_StopCinematic(void)
Definition: cl_cin.c:153
cheatvar_t::name
char * name
Definition: cl_main.c:1593
client_static_t::netchan
netchan_t netchan
Definition: client.h:224
client_static_t::realtime
int realtime
Definition: client.h:208
Cvar_VariableValue
float Cvar_VariableValue(char *var_name)
Definition: cvar.c:63