Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

client.h File Reference

#include "../game/q_shared.h"
#include "../qcommon/qcommon.h"
#include "../renderer/tr_public.h"
#include "../ui/ui_public.h"
#include "keys.h"
#include "snd_public.h"
#include "../cgame/cg_public.h"
#include "../game/bg_public.h"

Include dependency graph for client.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  clientActive_t
struct  clientConnection_t
struct  clientStatic_t
struct  clSnapshot_t
struct  kbutton_t
struct  outPacket_t
struct  ping_t
struct  serverAddress_t
struct  serverInfo_t

Defines

#define MAX_PARSE_ENTITIES   2048
#define RETRANSMIT_TIMEOUT   3000

Functions

void CIN_CloseAllVideos (void)
void CIN_DrawCinematic (int handle)
int CIN_PlayCinematic (const char *arg0, int xpos, int ypos, int width, int height, int bits)
e_status CIN_RunCinematic (int handle)
void CIN_SetExtents (int handle, int x, int y, int w, int h)
void CIN_SetLooping (int handle, qboolean loop)
e_status CIN_StopCinematic (int handle)
void CIN_UploadCinematic (int handle)
void CL_AddReliableCommand (const char *cmd)
qboolean CL_CDKeyValidate (const char *key, const char *checksum)
void CL_CGameRendering (stereoFrame_t stereo)
void CL_ClearPing (int n)
void CL_ClearState (void)
void CL_Disconnect_f (void)
void CL_FavoriteServers_f (void)
void CL_FirstSnapshot (void)
void CL_FlushMemory (void)
qboolean CL_GameCommand (void)
void CL_GetChallengePacket (void)
void CL_GetPing (int n, char *buf, int buflen, int *pingtime)
void CL_GetPingInfo (int n, char *buf, int buflen)
int CL_GetPingQueueCount (void)
void CL_GlobalServers_f (void)
void CL_Init (void)
void CL_InitCGame (void)
void CL_InitDownloads (void)
void CL_InitInput (void)
void CL_InitRef (void)
void CL_InitUI (void)
float CL_KeyState (kbutton_t *key)
void CL_LocalServers_f (void)
qboolean CL_Netchan_Process (netchan_t *chan, msg_t *msg)
void CL_Netchan_Transmit (netchan_t *chan, msg_t *msg)
void CL_Netchan_TransmitNextFragment (netchan_t *chan)
void CL_NextDemo (void)
void CL_NextDownload (void)
void CL_ParseServerMessage (msg_t *msg)
void CL_Ping_f (void)
void CL_PlayCinematic_f (void)
void CL_ReadDemoMessage (void)
void CL_ReadPackets (void)
void CL_SendCmd (void)
void CL_ServerInfoPacket (netadr_t from, msg_t *msg)
int CL_ServerStatus (char *serverAddress, char *serverStatusString, int maxLen)
void CL_SetCGameTime (void)
void CL_ShaderStateChanged (void)
void CL_ShutdownAll (void)
void CL_ShutdownCGame (void)
void CL_ShutdownRef (void)
void CL_ShutdownUI (void)
void CL_Snd_Restart_f (void)
void CL_StartDemoLoop (void)
void CL_StartHunkUsers (void)
void CL_SystemInfoChanged (void)
qboolean CL_UpdateVisiblePings_f (int source)
void CL_VerifyCode (void)
void CL_Vid_Restart_f (void)
void CL_WritePacket (void)
void Con_Bottom (void)
void Con_CheckResize (void)
void Con_Clear_f (void)
void Con_ClearNotify (void)
void Con_Close (void)
void Con_DrawCharacter (int cx, int line, int num)
void Con_DrawConsole (void)
void Con_DrawNotify (void)
void Con_Init (void)
void Con_PageDown (void)
void Con_PageUp (void)
void Con_RunConsole (void)
void Con_ToggleConsole_f (void)
void Con_Top (void)
void IN_CenterView (void)
int Key_GetCatcher (void)
char * Key_KeynumToString (int keynum)
void Key_SetCatcher (int catcher)
void LAN_LoadCachedServers ()
void LAN_SaveServersToCache ()
void SCR_AdjustFrom640 (float *x, float *y, float *w, float *h)
void SCR_DebugGraph (float value, int color)
void SCR_DrawBigString (int x, int y, const char *s, float alpha)
void SCR_DrawBigStringColor (int x, int y, const char *s, vec4_t color)
void SCR_DrawCinematic (void)
void SCR_DrawNamedPic (float x, float y, float width, float height, const char *picname)
void SCR_DrawPic (float x, float y, float width, float height, qhandle_t hShader)
void SCR_DrawSmallChar (int x, int y, int ch)
void SCR_DrawSmallStringExt (int x, int y, const char *string, float *setColor, qboolean forceColor)
void SCR_FillRect (float x, float y, float width, float height, const float *color)
int SCR_GetBigStringWidth (const char *str)
void SCR_Init (void)
void SCR_RunCinematic (void)
void SCR_StopCinematic (void)
void SCR_UpdateScreen (void)

Variables

vm_tcgvm
clientActive_t cl
cvar_tcl_activeAction
cvar_tcl_allowDownload
cvar_tcl_anglespeedkey
int cl_connectedToPureServer
cvar_tcl_conXOffset
cvar_tcl_debugMove
cvar_tcl_freelook
cvar_tcl_freezeDemo
cvar_tcl_inGameVideo
cvar_tcl_maxpackets
cvar_tcl_mouseAccel
cvar_tcl_nodelta
cvar_tcl_noprint
cvar_tcl_packetdup
cvar_tcl_pitchspeed
cvar_tcl_run
cvar_tcl_sensitivity
cvar_tcl_showMouseRate
cvar_tcl_shownet
cvar_tcl_showSend
cvar_tcl_showTimeDelta
cvar_tcl_timedemo
cvar_tcl_timegraph
cvar_tcl_timeNudge
cvar_tcl_yawspeed
clientConnection_t clc
clientStatic_t cls
int g_console_field_width
kbutton_t in_klook
kbutton_t in_mlook
kbutton_t in_speed
kbutton_t in_strafe
cvar_tm_filter
cvar_tm_forward
cvar_tm_pitch
cvar_tm_side
cvar_tm_yaw
refexport_t re
vm_tuivm


Define Documentation

#define MAX_PARSE_ENTITIES   2048
 

Definition at line 78 of file client.h.

Referenced by CL_DeltaEntity(), CL_GetParseEntityState(), CL_GetSnapshot(), CL_ParsePacketEntities(), and CL_ParseSnapshot().

#define RETRANSMIT_TIMEOUT   3000
 

Definition at line 33 of file client.h.


Function Documentation

void CIN_CloseAllVideos void   ) 
 

Definition at line 143 of file cl_cin.c.

00143                               {
00144     int     i;
00145 
00146     for ( i = 0 ; i < MAX_VIDEO_HANDLES ; i++ ) {
00147         if (cinTable[i].fileName[0] != 0 ) {
00148             CIN_StopCinematic(i);
00149         }
00150     }
00151 }

void CIN_DrawCinematic int  handle  ) 
 

Definition at line 1589 of file cl_cin.c.

References cin_cache::buf, byte, cin_cache::CIN_HEIGHT, cin_cache::CIN_WIDTH, cinTable, cin_cache::dirty, refexport_t::DrawStretchRaw, cin_cache::drawX, cin_cache::drawY, h(), cin_cache::height, Hunk_AllocateTempMemory(), Hunk_FreeTempMemory(), MAX_VIDEO_HANDLES, qtrue, re, SCR_AdjustFrom640(), cin_cache::status, w, cin_cache::width, x, cin_cache::xpos, y, and cin_cache::ypos.

Referenced by CL_CgameSystemCalls(), CL_UISystemCalls(), and SCR_DrawCinematic().

01589                                     {
01590     float   x, y, w, h;
01591     byte    *buf;
01592 
01593     if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return;
01594 
01595     if (!cinTable[handle].buf) {
01596         return;
01597     }
01598 
01599     x = cinTable[handle].xpos;
01600     y = cinTable[handle].ypos;
01601     w = cinTable[handle].width;
01602     h = cinTable[handle].height;
01603     buf = cinTable[handle].buf;
01604     SCR_AdjustFrom640( &x, &y, &w, &h );
01605 
01606     if (cinTable[handle].dirty && (cinTable[handle].CIN_WIDTH != cinTable[handle].drawX || cinTable[handle].CIN_HEIGHT != cinTable[handle].drawY)) {
01607         int ix, iy, *buf2, *buf3, xm, ym, ll;
01608                 
01609         xm = cinTable[handle].CIN_WIDTH/256;
01610         ym = cinTable[handle].CIN_HEIGHT/256;
01611                 ll = 8;
01612                 if (cinTable[handle].CIN_WIDTH==512) {
01613                     ll = 9;
01614                 }
01615                 
01616         buf3 = (int*)buf;
01617         buf2 = Hunk_AllocateTempMemory( 256*256*4 );
01618                 if (xm==2 && ym==2) {
01619                     byte *bc2, *bc3;
01620                     int ic, iiy;
01621                     
01622                     bc2 = (byte *)buf2;
01623                     bc3 = (byte *)buf3;
01624                     for (iy = 0; iy<256; iy++) {
01625                             iiy = iy<<12;
01626                             for (ix = 0; ix<2048; ix+=8) {
01627                                 for(ic = ix;ic<(ix+4);ic++) {
01628                                     *bc2=(bc3[iiy+ic]+bc3[iiy+4+ic]+bc3[iiy+2048+ic]+bc3[iiy+2048+4+ic])>>2;
01629                                     bc2++;
01630                                 }
01631                             }
01632                     }
01633                 } else if (xm==2 && ym==1) {
01634                     byte *bc2, *bc3;
01635                     int ic, iiy;
01636                     
01637                     bc2 = (byte *)buf2;
01638                     bc3 = (byte *)buf3;
01639                     for (iy = 0; iy<256; iy++) {
01640                             iiy = iy<<11;
01641                             for (ix = 0; ix<2048; ix+=8) {
01642                                 for(ic = ix;ic<(ix+4);ic++) {
01643                                     *bc2=(bc3[iiy+ic]+bc3[iiy+4+ic])>>1;
01644                                     bc2++;
01645                                 }
01646                             }
01647                     }
01648                 } else {
01649                     for (iy = 0; iy<256; iy++) {
01650                             for (ix = 0; ix<256; ix++) {
01651                                     buf2[(iy<<8)+ix] = buf3[((iy*ym)<<ll) + (ix*xm)];
01652                             }
01653                     }
01654                 }
01655         re.DrawStretchRaw( x, y, w, h, 256, 256, (byte *)buf2, handle, qtrue);
01656         cinTable[handle].dirty = qfalse;
01657         Hunk_FreeTempMemory(buf2);
01658         return;
01659     }
01660 
01661     re.DrawStretchRaw( x, y, w, h, cinTable[handle].drawX, cinTable[handle].drawY, buf, handle, cinTable[handle].dirty);
01662     cinTable[handle].dirty = qfalse;
01663 }

Here is the call graph for this function:

int CIN_PlayCinematic const char *  arg0,
int  xpos,
int  ypos,
int  width,
int  height,
int  bits
 

Definition at line 1481 of file cl_cin.c.

References cin_cache::alterGameState, cin, CIN_HandleForVideo(), cin_cache::CIN_HEIGHT, CIN_loop, CIN_SetExtents(), CIN_SetLooping(), cin_cache::CIN_WIDTH, cinTable, cl_inGameVideo, cls, Com_DPrintf(), Com_Memset(), Com_sprintf(), Con_Close(), cinematics_t::currentHandle, currentHandle, cinematics_t::file, cin_cache::fileName, FS_FOpenFileRead(), FS_Read(), h(), cin_cache::holdAtEnd, i, cin_cache::iFile, initRoQ(), cvar_s::integer, name, NULL, cin_cache::playonwalls, qtrue, RoQ_init(), RoQShutdown(), cin_cache::ROQSize, s_rawend, cin_cache::shader, cin_cache::silent, clientStatic_t::state, cin_cache::status, strcmp(), strcpy(), strstr(), Sys_BeginStreamedFile(), UI_SET_ACTIVE_MENU, UIMENU_NONE, uivm, VM_Call(), w, x, and y.

Referenced by CL_CgameSystemCalls(), CL_PlayCinematic_f(), and CL_UISystemCalls().

01481                                                                                      {
01482     unsigned short RoQID;
01483     char    name[MAX_OSPATH];
01484     int     i;
01485 
01486     if (strstr(arg, "/") == NULL && strstr(arg, "\\") == NULL) {
01487         Com_sprintf (name, sizeof(name), "video/%s", arg);
01488     } else {
01489         Com_sprintf (name, sizeof(name), "%s", arg);
01490     }
01491 
01492     if (!(systemBits & CIN_system)) {
01493         for ( i = 0 ; i < MAX_VIDEO_HANDLES ; i++ ) {
01494             if (!strcmp(cinTable[i].fileName, name) ) {
01495                 return i;
01496             }
01497         }
01498     }
01499 
01500     Com_DPrintf("SCR_PlayCinematic( %s )\n", arg);
01501 
01502     Com_Memset(&cin, 0, sizeof(cinematics_t) );
01503     currentHandle = CIN_HandleForVideo();
01504 
01505     cin.currentHandle = currentHandle;
01506 
01507     strcpy(cinTable[currentHandle].fileName, name);
01508 
01509     cinTable[currentHandle].ROQSize = 0;
01510     cinTable[currentHandle].ROQSize = FS_FOpenFileRead (cinTable[currentHandle].fileName, &cinTable[currentHandle].iFile, qtrue);
01511 
01512     if (cinTable[currentHandle].ROQSize<=0) {
01513         Com_DPrintf("play(%s), ROQSize<=0\n", arg);
01514         cinTable[currentHandle].fileName[0] = 0;
01515         return -1;
01516     }
01517 
01518     CIN_SetExtents(currentHandle, x, y, w, h);
01519     CIN_SetLooping(currentHandle, (systemBits & CIN_loop)!=0);
01520 
01521     cinTable[currentHandle].CIN_HEIGHT = DEFAULT_CIN_HEIGHT;
01522     cinTable[currentHandle].CIN_WIDTH  =  DEFAULT_CIN_WIDTH;
01523     cinTable[currentHandle].holdAtEnd = (systemBits & CIN_hold) != 0;
01524     cinTable[currentHandle].alterGameState = (systemBits & CIN_system) != 0;
01525     cinTable[currentHandle].playonwalls = 1;
01526     cinTable[currentHandle].silent = (systemBits & CIN_silent) != 0;
01527     cinTable[currentHandle].shader = (systemBits & CIN_shader) != 0;
01528 
01529     if (cinTable[currentHandle].alterGameState) {
01530         // close the menu
01531         if ( uivm ) {
01532             VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_NONE );
01533         }
01534     } else {
01535         cinTable[currentHandle].playonwalls = cl_inGameVideo->integer;
01536     }
01537 
01538     initRoQ();
01539                     
01540     FS_Read (cin.file, 16, cinTable[currentHandle].iFile);
01541 
01542     RoQID = (unsigned short)(cin.file[0]) + (unsigned short)(cin.file[1])*256;
01543     if (RoQID == 0x1084)
01544     {
01545         RoQ_init();
01546 //      FS_Read (cin.file, cinTable[currentHandle].RoQFrameSize+8, cinTable[currentHandle].iFile);
01547         // let the background thread start reading ahead
01548         Sys_BeginStreamedFile( cinTable[currentHandle].iFile, 0x10000 );
01549 
01550         cinTable[currentHandle].status = FMV_PLAY;
01551         Com_DPrintf("trFMV::play(), playing %s\n", arg);
01552 
01553         if (cinTable[currentHandle].alterGameState) {
01554             cls.state = CA_CINEMATIC;
01555         }
01556         
01557         Con_Close();
01558 
01559         s_rawend = s_soundtime;
01560 
01561         return currentHandle;
01562     }
01563     Com_DPrintf("trFMV::play(), invalid RoQ ID\n");
01564 
01565     RoQShutdown();
01566     return -1;
01567 }

Here is the call graph for this function:

e_status CIN_RunCinematic int  handle  ) 
 

Definition at line 1405 of file cl_cin.c.

References abs(), cin_cache::alterGameState, cin, cinTable, CL_ScaledMilliseconds(), cls, com_timescale, currentHandle, cinematics_t::currentHandle, e_status, cin_cache::lastTime, cin_cache::looping, MAX_VIDEO_HANDLES, cin_cache::numQuads, cin_cache::playonwalls, RoQInterrupt(), RoQReset(), RoQShutdown(), cin_cache::shader, cin_cache::startTime, clientStatic_t::state, cin_cache::status, cin_cache::tfps, and cvar_s::value.

Referenced by CL_CgameSystemCalls(), CL_UISystemCalls(), and SCR_RunCinematic().

01406 {
01407         // bk001204 - init
01408     int start = 0;
01409     int     thisTime = 0;
01410 
01411     if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return FMV_EOF;
01412 
01413     if (cin.currentHandle != handle) {
01414         currentHandle = handle;
01415         cin.currentHandle = currentHandle;
01416         cinTable[currentHandle].status = FMV_EOF;
01417         RoQReset();
01418     }
01419 
01420     if (cinTable[handle].playonwalls < -1)
01421     {
01422         return cinTable[handle].status;
01423     }
01424 
01425     currentHandle = handle;
01426 
01427     if (cinTable[currentHandle].alterGameState) {
01428         if ( cls.state != CA_CINEMATIC ) {
01429             return cinTable[currentHandle].status;
01430         }
01431     }
01432 
01433     if (cinTable[currentHandle].status == FMV_IDLE) {
01434         return cinTable[currentHandle].status;
01435     }
01436 
01437     // we need to use CL_ScaledMilliseconds because of the smp mode calls from the renderer
01438     thisTime = CL_ScaledMilliseconds()*com_timescale->value;
01439     if (cinTable[currentHandle].shader && (abs(thisTime - cinTable[currentHandle].lastTime))>100) {
01440         cinTable[currentHandle].startTime += thisTime - cinTable[currentHandle].lastTime;
01441     }
01442     // we need to use CL_ScaledMilliseconds because of the smp mode calls from the renderer
01443     cinTable[currentHandle].tfps = ((((CL_ScaledMilliseconds()*com_timescale->value) - cinTable[currentHandle].startTime)*3)/100);
01444 
01445     start = cinTable[currentHandle].startTime;
01446     while(  (cinTable[currentHandle].tfps != cinTable[currentHandle].numQuads)
01447         && (cinTable[currentHandle].status == FMV_PLAY) ) 
01448     {
01449         RoQInterrupt();
01450         if (start != cinTable[currentHandle].startTime) {
01451             // we need to use CL_ScaledMilliseconds because of the smp mode calls from the renderer
01452           cinTable[currentHandle].tfps = ((((CL_ScaledMilliseconds()*com_timescale->value)
01453                               - cinTable[currentHandle].startTime)*3)/100);
01454             start = cinTable[currentHandle].startTime;
01455         }
01456     }
01457 
01458     cinTable[currentHandle].lastTime = thisTime;
01459 
01460     if (cinTable[currentHandle].status == FMV_LOOPED) {
01461         cinTable[currentHandle].status = FMV_PLAY;
01462     }
01463 
01464     if (cinTable[currentHandle].status == FMV_EOF) {
01465       if (cinTable[currentHandle].looping) {
01466         RoQReset();
01467       } else {
01468         RoQShutdown();
01469       }
01470     }
01471 
01472     return cinTable[currentHandle].status;
01473 }

Here is the call graph for this function:

void CIN_SetExtents int  handle,
int  x,
int  y,
int  w,
int  h
 

Definition at line 1569 of file cl_cin.c.

References cinTable, cin_cache::dirty, cin_cache::height, MAX_VIDEO_HANDLES, cin_cache::status, cin_cache::width, cin_cache::xpos, and cin_cache::ypos.

Referenced by CIN_PlayCinematic(), CL_CgameSystemCalls(), and CL_UISystemCalls().

01569                                                              {
01570     if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return;
01571     cinTable[handle].xpos = x;
01572     cinTable[handle].ypos = y;
01573     cinTable[handle].width = w;
01574     cinTable[handle].height = h;
01575     cinTable[handle].dirty = qtrue;
01576 }

void CIN_SetLooping int  handle,
qboolean  loop
 

Definition at line 1578 of file cl_cin.c.

References cinTable, cin_cache::looping, MAX_VIDEO_HANDLES, and cin_cache::status.

Referenced by CIN_PlayCinematic().

01578                                                {
01579     if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return;
01580     cinTable[handle].looping = loop;
01581 }

e_status CIN_StopCinematic int  handle  ) 
 

Definition at line 1374 of file cl_cin.c.

References cin_cache::alterGameState, cin_cache::buf, cinTable, cls, Com_DPrintf(), currentHandle, e_status, MAX_VIDEO_HANDLES, RoQShutdown(), clientStatic_t::state, and cin_cache::status.

Referenced by CIN_CloseAllVideos(), CL_CgameSystemCalls(), CL_UISystemCalls(), and SCR_StopCinematic().

01374                                        {
01375     
01376     if (handle < 0 || handle>= MAX_VIDEO_HANDLES || cinTable[handle].status == FMV_EOF) return FMV_EOF;
01377     currentHandle = handle;
01378 
01379     Com_DPrintf("trFMV::stop(), closing %s\n", cinTable[currentHandle].fileName);
01380 
01381     if (!cinTable[currentHandle].buf) {
01382         return FMV_EOF;
01383     }
01384 
01385     if (cinTable[currentHandle].alterGameState) {
01386         if ( cls.state != CA_CINEMATIC ) {
01387             return cinTable[currentHandle].status;
01388         }
01389     }
01390     cinTable[currentHandle].status = FMV_EOF;
01391     RoQShutdown();
01392 
01393     return FMV_EOF;
01394 }

Here is the call graph for this function:

void CIN_UploadCinematic int  handle  ) 
 

Definition at line 1718 of file cl_cin.c.

References cin_cache::buf, cinTable, cl_inGameVideo, cin_cache::dirty, cvar_s::integer, cin_cache::playonwalls, re, and refexport_t::UploadCinematic.

01718                                      {
01719     if (handle >= 0 && handle < MAX_VIDEO_HANDLES) {
01720         if (!cinTable[handle].buf) {
01721             return;
01722         }
01723         if (cinTable[handle].playonwalls <= 0 && cinTable[handle].dirty) {
01724             if (cinTable[handle].playonwalls == 0) {
01725                 cinTable[handle].playonwalls = -1;
01726             } else {
01727                 if (cinTable[handle].playonwalls == -1) {
01728                     cinTable[handle].playonwalls = -2;
01729                 } else {
01730                     cinTable[handle].dirty = qfalse;
01731                 }
01732             }
01733         }
01734         re.UploadCinematic( 256, 256, 256, 256, cinTable[handle].buf, handle, cinTable[handle].dirty);
01735         if (cl_inGameVideo->integer == 0 && cinTable[handle].playonwalls == 1) {
01736             cinTable[handle].playonwalls--;
01737         }
01738     }
01739 }

void CL_AddReliableCommand const char *  cmd  ) 
 

Definition at line 133 of file cl_main.c.

References clc, Com_Error(), ERR_DROP, MAX_RELIABLE_COMMANDS, Q_strncpyz(), clientConnection_t::reliableAcknowledge, clientConnection_t::reliableCommands, and clientConnection_t::reliableSequence.

Referenced by CL_BeginDownload(), CL_CgameSystemCalls(), CL_CheckUserinfo(), CL_Disconnect(), CL_DownloadsComplete(), CL_ForwardCommandToServer(), CL_ForwardToServer_f(), CL_ParseDownload(), CL_ResetPureClientAtServer(), CL_SendPureChecksums(), and Message_Key().

00133                                               {
00134     int     index;
00135 
00136     // if we would be losing an old command that hasn't been acknowledged,
00137     // we must drop the connection
00138     if ( clc.reliableSequence - clc.reliableAcknowledge > MAX_RELIABLE_COMMANDS ) {
00139         Com_Error( ERR_DROP, "Client command overflow" );
00140     }
00141     clc.reliableSequence++;
00142     index = clc.reliableSequence & ( MAX_RELIABLE_COMMANDS - 1 );
00143     Q_strncpyz( clc.reliableCommands[ index ], cmd, sizeof( clc.reliableCommands[ index ] ) );
00144 }

Here is the call graph for this function:

qboolean CL_CDKeyValidate const char *  key,
const char *  checksum
 

Definition at line 3265 of file cl_main.c.

03265                                                                    {
03266     char    ch;
03267     byte    sum;
03268     char    chs[3];
03269     int i, len;
03270 
03271     len = strlen(key);
03272     if( len != CDKEY_LEN ) {
03273         return qfalse;
03274     }
03275 
03276     if( checksum && strlen( checksum ) != CDCHKSUM_LEN ) {
03277         return qfalse;
03278     }
03279 
03280     sum = 0;
03281     // for loop gets rid of conditional assignment warning
03282     for (i = 0; i < len; i++) {
03283         ch = *key++;
03284         if (ch>='a' && ch<='z') {
03285             ch -= 32;
03286         }
03287         switch( ch ) {
03288         case '2':
03289         case '3':
03290         case '7':
03291         case 'A':
03292         case 'B':
03293         case 'C':
03294         case 'D':
03295         case 'G':
03296         case 'H':
03297         case 'J':
03298         case 'L':
03299         case 'P':
03300         case 'R':
03301         case 'S':
03302         case 'T':
03303         case 'W':
03304             sum += ch;
03305             continue;
03306         default:
03307             return qfalse;
03308         }
03309     }
03310 
03311     sprintf(chs, "%02x", sum);
03312     
03313     if (checksum && !Q_stricmp(chs, checksum)) {
03314         return qtrue;
03315     }
03316 
03317     if (!checksum) {
03318         return qtrue;
03319     }
03320 
03321     return qfalse;
03322 }

void CL_CGameRendering stereoFrame_t  stereo  ) 
 

Definition at line 794 of file cl_cgame.c.

References CG_DRAW_ACTIVE_FRAME, cgvm, cl, clc, clientConnection_t::demoplaying, clientActive_t::serverTime, VM_Call(), and VM_Debug().

Referenced by SCR_DrawScreenField().

00794                                                {
00795     VM_Call( cgvm, CG_DRAW_ACTIVE_FRAME, cl.serverTime, stereo, clc.demoplaying );
00796     VM_Debug( 0 );
00797 }

Here is the call graph for this function:

void CL_ClearPing int  n  ) 
 

Definition at line 2986 of file cl_main.c.

References ping_t::adr, cl_pinglist, and netadr_t::port.

Referenced by CL_UpdateVisiblePings_f(), and LAN_ClearPing().

02987 {
02988     if (n < 0 || n >= MAX_PINGREQUESTS)
02989         return;
02990 
02991     cl_pinglist[n].adr.port = 0;
02992 }

void CL_ClearState void   ) 
 

Definition at line 705 of file cl_main.c.

References cl, and Com_Memset().

Referenced by CL_Disconnect(), CL_Init(), and CL_ParseGamestate().

00705                           {
00706 
00707 //  S_StopAllSounds();
00708 
00709     Com_Memset( &cl, 0, sizeof( cl ) );
00710 }

Here is the call graph for this function:

void CL_Disconnect_f void   ) 
 

Definition at line 998 of file cl_main.c.

References CA_DISCONNECTED, cls, Com_Error(), Cvar_Set(), ERR_DISCONNECT, SCR_StopCinematic(), and clientStatic_t::state.

Referenced by CL_Init(), and CL_KeyEvent().

00998                              {
00999     SCR_StopCinematic();
01000     Cvar_Set("ui_singlePlayerActive", "0");
01001     if ( cls.state != CA_DISCONNECTED && cls.state != CA_CINEMATIC ) {
01002         Com_Error (ERR_DISCONNECT, "Disconnected from server");
01003     }
01004 }

Here is the call graph for this function:

void CL_FavoriteServers_f void   ) 
 

void CL_FirstSnapshot void   ) 
 

Definition at line 885 of file cl_cgame.c.

References Cbuf_AddText(), cl, cl_activeAction, clc, cls, Cvar_Set(), clientActive_t::oldServerTime, clientStatic_t::realtime, clSnapshot_t::serverTime, clientActive_t::serverTimeDelta, clientActive_t::snap, clSnapshot_t::snapFlags, clientStatic_t::state, cvar_s::string, Sys_BeginProfiling(), and clientConnection_t::timeDemoBaseTime.

Referenced by CL_SetCGameTime().

00885                               {
00886     // ignore snapshots that don't have entities
00887     if ( cl.snap.snapFlags & SNAPFLAG_NOT_ACTIVE ) {
00888         return;
00889     }
00890     cls.state = CA_ACTIVE;
00891 
00892     // set the timedelta so we are exactly on this first frame
00893     cl.serverTimeDelta = cl.snap.serverTime - cls.realtime;
00894     cl.oldServerTime = cl.snap.serverTime;
00895 
00896     clc.timeDemoBaseTime = cl.snap.serverTime;
00897 
00898     // if this is the first frame of active play,
00899     // execute the contents of activeAction now
00900     // this is to allow scripting a timedemo to start right
00901     // after loading
00902     if ( cl_activeAction->string[0] ) {
00903         Cbuf_AddText( cl_activeAction->string );
00904         Cvar_Set( "activeAction", "" );
00905     }
00906     
00907     Sys_BeginProfiling();
00908 }

Here is the call graph for this function:

void CL_FlushMemory void   ) 
 

Definition at line 637 of file cl_main.c.

00637                             {
00638 
00639     // shutdown all the client stuff
00640     CL_ShutdownAll();
00641 
00642     // if not running a server clear the whole hunk
00643     if ( !com_sv_running->integer ) {
00644         // clear the whole hunk
00645         Hunk_Clear();
00646         // clear collision map data
00647         CM_ClearMap();
00648     }
00649     else {
00650         // clear all the client data on the hunk
00651         Hunk_ClearToMark();
00652     }
00653 
00654     CL_StartHunkUsers();
00655 }

qboolean CL_GameCommand void   ) 
 

Definition at line 779 of file cl_cgame.c.

00779                                 {
00780     if ( !cgvm ) {
00781         return qfalse;
00782     }
00783 
00784     return VM_Call( cgvm, CG_CONSOLE_COMMAND );
00785 }

void CL_GetChallengePacket void   ) 
 

void CL_GetPing int  n,
char *  buf,
int  buflen,
int *  pingtime
 

Definition at line 2910 of file cl_main.c.

References ping_t::adr, cl_pinglist, CL_SetServerInfoByAddress(), cls, Cvar_VariableIntegerValue(), n, NET_AdrToString(), netadr_t::port, Q_strncpyz(), clientStatic_t::realtime, ping_t::start, ping_t::time, and time().

Referenced by CL_UpdateVisiblePings_f(), and LAN_GetPing().

02911 {
02912     const char  *str;
02913     int     time;
02914     int     maxPing;
02915 
02916     if (!cl_pinglist[n].adr.port)
02917     {
02918         // empty slot
02919         buf[0]    = '\0';
02920         *pingtime = 0;
02921         return;
02922     }
02923 
02924     str = NET_AdrToString( cl_pinglist[n].adr );
02925     Q_strncpyz( buf, str, buflen );
02926 
02927     time = cl_pinglist[n].time;
02928     if (!time)
02929     {
02930         // check for timeout
02931         time = cls.realtime - cl_pinglist[n].start;
02932         maxPing = Cvar_VariableIntegerValue( "cl_maxPing" );
02933         if( maxPing < 100 ) {
02934             maxPing = 100;
02935         }
02936         if (time < maxPing)
02937         {
02938             // not timed out yet
02939             time = 0;
02940         }
02941     }
02942 
02943     CL_SetServerInfoByAddress(cl_pinglist[n].adr, cl_pinglist[n].info, cl_pinglist[n].time);
02944 
02945     *pingtime = time;
02946 }

Here is the call graph for this function:

void CL_GetPingInfo int  n,
char *  buf,
int  buflen
 

Definition at line 2968 of file cl_main.c.

References ping_t::adr, cl_pinglist, n, netadr_t::port, and Q_strncpyz().

Referenced by LAN_GetPingInfo().

02969 {
02970     if (!cl_pinglist[n].adr.port)
02971     {
02972         // empty slot
02973         if (buflen)
02974             buf[0] = '\0';
02975         return;
02976     }
02977 
02978     Q_strncpyz( buf, cl_pinglist[n].info, buflen );
02979 }

Here is the call graph for this function:

int CL_GetPingQueueCount void   ) 
 

Definition at line 2999 of file cl_main.c.

References ping_t::adr, count, i, and netadr_t::port.

Referenced by CL_UpdateVisiblePings_f(), and LAN_GetPingQueueCount().

03000 {
03001     int     i;
03002     int     count;
03003     ping_t* pingptr;
03004 
03005     count   = 0;
03006     pingptr = cl_pinglist;
03007 
03008     for (i=0; i<MAX_PINGREQUESTS; i++, pingptr++ ) {
03009         if (pingptr->adr.port) {
03010             count++;
03011         }
03012     }
03013 
03014     return (count);
03015 }

void CL_GlobalServers_f void   ) 
 

Definition at line 2856 of file cl_main.c.

References atoi, BigShort(), cls, Cmd_Argc(), Cmd_Argv(), Com_Printf(), count, Cvar_VariableValue(), i, MASTER_SERVER_NAME, clientStatic_t::masterNum, NET_OutOfBandPrint(), NET_StringToAdr(), NS_SERVER, clientStatic_t::numglobalservers, clientStatic_t::nummplayerservers, clientStatic_t::pingUpdateSource, netadr_t::port, PORT_MASTER, sprintf(), strlen(), and netadr_t::type.

Referenced by CL_Init().

02856                                 {
02857     netadr_t    to;
02858     int         i;
02859     int         count;
02860     char        *buffptr;
02861     char        command[1024];
02862     
02863     if ( Cmd_Argc() < 3) {
02864         Com_Printf( "usage: globalservers <master# 0-1> <protocol> [keywords]\n");
02865         return; 
02866     }
02867 
02868     cls.masterNum = atoi( Cmd_Argv(1) );
02869 
02870     Com_Printf( "Requesting servers from the master...\n");
02871 
02872     // reset the list, waiting for response
02873     // -1 is used to distinguish a "no response"
02874 
02875     if( cls.masterNum == 1 ) {
02876         NET_StringToAdr( MASTER_SERVER_NAME, &to );
02877         cls.nummplayerservers = -1;
02878         cls.pingUpdateSource = AS_MPLAYER;
02879     }
02880     else {
02881         NET_StringToAdr( MASTER_SERVER_NAME, &to );
02882         cls.numglobalservers = -1;
02883         cls.pingUpdateSource = AS_GLOBAL;
02884     }
02885     to.type = NA_IP;
02886     to.port = BigShort(PORT_MASTER);
02887 
02888     sprintf( command, "getservers %s", Cmd_Argv(2) );
02889 
02890     // tack on keywords
02891     buffptr = command + strlen( command );
02892     count   = Cmd_Argc();
02893     for (i=3; i<count; i++)
02894         buffptr += sprintf( buffptr, " %s", Cmd_Argv(i) );
02895 
02896     // if we are a demo, automatically add a "demo" keyword
02897     if ( Cvar_VariableValue( "fs_restrict" ) ) {
02898         buffptr += sprintf( buffptr, " demo" );
02899     }
02900 
02901     NET_OutOfBandPrint( NS_SERVER, to, command );
02902 }

Here is the call graph for this function:

void CL_Init void   ) 
 

Definition at line 2265 of file cl_main.c.

02265                      {
02266     Com_Printf( "----- Client Initialization -----\n" );
02267 
02268     Con_Init ();    
02269 
02270     CL_ClearState ();
02271 
02272     cls.state = CA_DISCONNECTED;    // no longer CA_UNINITIALIZED
02273 
02274     cls.realtime = 0;
02275 
02276     CL_InitInput ();
02277 
02278     //
02279     // register our variables
02280     //
02281     cl_noprint = Cvar_Get( "cl_noprint", "0", 0 );
02282     cl_motd = Cvar_Get ("cl_motd", "1", 0);
02283 
02284     cl_timeout = Cvar_Get ("cl_timeout", "200", 0);
02285 
02286     cl_timeNudge = Cvar_Get ("cl_timeNudge", "0", CVAR_TEMP );
02287     cl_shownet = Cvar_Get ("cl_shownet", "0", CVAR_TEMP );
02288     cl_showSend = Cvar_Get ("cl_showSend", "0", CVAR_TEMP );
02289     cl_showTimeDelta = Cvar_Get ("cl_showTimeDelta", "0", CVAR_TEMP );
02290     cl_freezeDemo = Cvar_Get ("cl_freezeDemo", "0", CVAR_TEMP );
02291     rcon_client_password = Cvar_Get ("rconPassword", "", CVAR_TEMP );
02292     cl_activeAction = Cvar_Get( "activeAction", "", CVAR_TEMP );
02293 
02294     cl_timedemo = Cvar_Get ("timedemo", "0", 0);
02295     cl_avidemo = Cvar_Get ("cl_avidemo", "0", 0);
02296     cl_forceavidemo = Cvar_Get ("cl_forceavidemo", "0", 0);
02297 
02298     rconAddress = Cvar_Get ("rconAddress", "", 0);
02299 
02300     cl_yawspeed = Cvar_Get ("cl_yawspeed", "140", CVAR_ARCHIVE);
02301     cl_pitchspeed = Cvar_Get ("cl_pitchspeed", "140", CVAR_ARCHIVE);
02302     cl_anglespeedkey = Cvar_Get ("cl_anglespeedkey", "1.5", 0);
02303 
02304     cl_maxpackets = Cvar_Get ("cl_maxpackets", "30", CVAR_ARCHIVE );
02305     cl_packetdup = Cvar_Get ("cl_packetdup", "1", CVAR_ARCHIVE );
02306 
02307     cl_run = Cvar_Get ("cl_run", "1", CVAR_ARCHIVE);
02308     cl_sensitivity = Cvar_Get ("sensitivity", "5", CVAR_ARCHIVE);
02309     cl_mouseAccel = Cvar_Get ("cl_mouseAccel", "0", CVAR_ARCHIVE);
02310     cl_freelook = Cvar_Get( "cl_freelook", "1", CVAR_ARCHIVE );
02311 
02312     cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
02313 
02314     cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);
02315 
02316     cl_conXOffset = Cvar_Get ("cl_conXOffset", "0", 0);
02317 #ifdef MACOS_X
02318         // In game video is REALLY slow in Mac OS X right now due to driver slowness
02319     cl_inGameVideo = Cvar_Get ("r_inGameVideo", "0", CVAR_ARCHIVE);
02320 #else
02321     cl_inGameVideo = Cvar_Get ("r_inGameVideo", "1", CVAR_ARCHIVE);
02322 #endif
02323 
02324     cl_serverStatusResendTime = Cvar_Get ("cl_serverStatusResendTime", "750", 0);
02325 
02326     // init autoswitch so the ui will have it correctly even
02327     // if the cgame hasn't been started
02328     Cvar_Get ("cg_autoswitch", "1", CVAR_ARCHIVE);
02329 
02330     m_pitch = Cvar_Get ("m_pitch", "0.022", CVAR_ARCHIVE);
02331     m_yaw = Cvar_Get ("m_yaw", "0.022", CVAR_ARCHIVE);
02332     m_forward = Cvar_Get ("m_forward", "0.25", CVAR_ARCHIVE);
02333     m_side = Cvar_Get ("m_side", "0.25", CVAR_ARCHIVE);
02334 #ifdef MACOS_X
02335         // Input is jittery on OS X w/o this
02336     m_filter = Cvar_Get ("m_filter", "1", CVAR_ARCHIVE);
02337 #else
02338     m_filter = Cvar_Get ("m_filter", "0", CVAR_ARCHIVE);
02339 #endif
02340 
02341     cl_motdString = Cvar_Get( "cl_motdString", "", CVAR_ROM );
02342 
02343     Cvar_Get( "cl_maxPing", "800", CVAR_ARCHIVE );
02344 
02345 
02346     // userinfo
02347     Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE );
02348     Cvar_Get ("rate", "3000", CVAR_USERINFO | CVAR_ARCHIVE );
02349     Cvar_Get ("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE );
02350     Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
02351     Cvar_Get ("headmodel", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
02352     Cvar_Get ("team_model", "james", CVAR_USERINFO | CVAR_ARCHIVE );
02353     Cvar_Get ("team_headmodel", "*james", CVAR_USERINFO | CVAR_ARCHIVE );
02354     Cvar_Get ("g_redTeam", "Stroggs", CVAR_SERVERINFO | CVAR_ARCHIVE);
02355     Cvar_Get ("g_blueTeam", "Pagans", CVAR_SERVERINFO | CVAR_ARCHIVE);
02356     Cvar_Get ("color1",  "4", CVAR_USERINFO | CVAR_ARCHIVE );
02357     Cvar_Get ("color2", "5", CVAR_USERINFO | CVAR_ARCHIVE );
02358     Cvar_Get ("handicap", "100", CVAR_USERINFO | CVAR_ARCHIVE );
02359     Cvar_Get ("teamtask", "0", CVAR_USERINFO );
02360     Cvar_Get ("sex", "male", CVAR_USERINFO | CVAR_ARCHIVE );
02361     Cvar_Get ("cl_anonymous", "0", CVAR_USERINFO | CVAR_ARCHIVE );
02362 
02363     Cvar_Get ("password", "", CVAR_USERINFO);
02364     Cvar_Get ("cg_predictItems", "1", CVAR_USERINFO | CVAR_ARCHIVE );
02365 
02366 
02367     // cgame might not be initialized before menu is used
02368     Cvar_Get ("cg_viewsize", "100", CVAR_ARCHIVE );
02369 
02370     //
02371     // register our commands
02372     //
02373     Cmd_AddCommand ("cmd", CL_ForwardToServer_f);
02374     Cmd_AddCommand ("configstrings", CL_Configstrings_f);
02375     Cmd_AddCommand ("clientinfo", CL_Clientinfo_f);
02376     Cmd_AddCommand ("snd_restart", CL_Snd_Restart_f);
02377     Cmd_AddCommand ("vid_restart", CL_Vid_Restart_f);
02378     Cmd_AddCommand ("disconnect", CL_Disconnect_f);
02379     Cmd_AddCommand ("record", CL_Record_f);
02380     Cmd_AddCommand ("demo", CL_PlayDemo_f);
02381     Cmd_AddCommand ("cinematic", CL_PlayCinematic_f);
02382     Cmd_AddCommand ("stoprecord", CL_StopRecord_f);
02383     Cmd_AddCommand ("connect", CL_Connect_f);
02384     Cmd_AddCommand ("reconnect", CL_Reconnect_f);
02385     Cmd_AddCommand ("localservers", CL_LocalServers_f);
02386     Cmd_AddCommand ("globalservers", CL_GlobalServers_f);
02387     Cmd_AddCommand ("rcon", CL_Rcon_f);
02388     Cmd_AddCommand ("setenv", CL_Setenv_f );
02389     Cmd_AddCommand ("ping", CL_Ping_f );
02390     Cmd_AddCommand ("serverstatus", CL_ServerStatus_f );
02391     Cmd_AddCommand ("showip", CL_ShowIP_f );
02392     Cmd_AddCommand ("fs_openedList", CL_OpenedPK3List_f );
02393     Cmd_AddCommand ("fs_referencedList", CL_ReferencedPK3List_f );
02394     Cmd_AddCommand ("model", CL_SetModel_f );
02395     CL_InitRef();
02396 
02397     SCR_Init ();
02398 
02399     Cbuf_Execute ();
02400 
02401     Cvar_Set( "cl_running", "1" );
02402 
02403     Com_Printf( "----- Client Initialization Complete -----\n" );
02404 }

void CL_InitCGame void   ) 
 

Definition at line 715 of file cl_cgame.c.

References CG_INIT, cgvm, cl, CL_CgameSystemCalls(), cl_connectedToPureServer, clc, clientConnection_t::clientNum, cls, Com_Error(), Com_Printf(), Com_sprintf(), Com_TouchMemory(), Con_ClearNotify(), Con_Close(), Cvar_VariableValue(), refexport_t::EndRegistration, ERR_DROP, clientActive_t::gameState, Info_ValueForKey(), clientConnection_t::lastExecutedServerCommand, clientActive_t::mapname, re, clientConnection_t::serverMessageSequence, clientStatic_t::state, gameState_t::stringData, gameState_t::stringOffsets, Sys_LowPhysicalMemory(), Sys_Milliseconds(), VM_Call(), VM_Create(), and vmInterpret_t.

Referenced by CL_DownloadsComplete(), and CL_Vid_Restart_f().

00715                           {
00716     const char          *info;
00717     const char          *mapname;
00718     int                 t1, t2;
00719     vmInterpret_t       interpret;
00720 
00721     t1 = Sys_Milliseconds();
00722 
00723     // put away the console
00724     Con_Close();
00725 
00726     // find the current mapname
00727     info = cl.gameState.stringData + cl.gameState.stringOffsets[ CS_SERVERINFO ];
00728     mapname = Info_ValueForKey( info, "mapname" );
00729     Com_sprintf( cl.mapname, sizeof( cl.mapname ), "maps/%s.bsp", mapname );
00730 
00731     // load the dll or bytecode
00732     if ( cl_connectedToPureServer != 0 ) {
00733         // if sv_pure is set we only allow qvms to be loaded
00734         interpret = VMI_COMPILED;
00735     }
00736     else {
00737         interpret = Cvar_VariableValue( "vm_cgame" );
00738     }
00739     cgvm = VM_Create( "cgame", CL_CgameSystemCalls, interpret );
00740     if ( !cgvm ) {
00741         Com_Error( ERR_DROP, "VM_Create on cgame failed" );
00742     }
00743     cls.state = CA_LOADING;
00744 
00745     // init for this gamestate
00746     // use the lastExecutedServerCommand instead of the serverCommandSequence
00747     // otherwise server commands sent just before a gamestate are dropped
00748     VM_Call( cgvm, CG_INIT, clc.serverMessageSequence, clc.lastExecutedServerCommand, clc.clientNum );
00749 
00750     // we will send a usercmd this frame, which
00751     // will cause the server to send us the first snapshot
00752     cls.state = CA_PRIMED;
00753 
00754     t2 = Sys_Milliseconds();
00755 
00756     Com_Printf( "CL_InitCGame: %5.2f seconds\n", (t2-t1)/1000.0 );
00757 
00758     // have the renderer touch all its images, so they are present
00759     // on the card even if the driver does deferred loading
00760     re.EndRegistration();
00761 
00762     // make sure everything is paged in
00763     if (!Sys_LowPhysicalMemory()) {
00764         Com_TouchMemory();
00765     }
00766 
00767     // clear anything that got printed
00768     Con_ClearNotify ();
00769 }

Here is the call graph for this function:

void CL_InitDownloads void   ) 
 

Definition at line 1454 of file cl_main.c.

References cl_allowDownload, CL_DownloadsComplete(), CL_NextDownload(), clc, cls, Com_Printf(), clientConnection_t::downloadList, FS_ComparePaks(), cvar_s::integer, qfalse, qtrue, and clientStatic_t::state.

Referenced by CL_ParseGamestate().

01454                             {
01455   char missingfiles[1024];
01456 
01457   if ( !cl_allowDownload->integer )
01458   {
01459     // autodownload is disabled on the client
01460     // but it's possible that some referenced files on the server are missing
01461     if (FS_ComparePaks( missingfiles, sizeof( missingfiles ), qfalse ) )
01462     {      
01463       // NOTE TTimo I would rather have that printed as a modal message box
01464       //   but at this point while joining the game we don't know wether we will successfully join or not
01465       Com_Printf( "\nWARNING: You are missing some files referenced by the server:\n%s"
01466                   "You might not be able to join the game\n"
01467                   "Go to the setting menu to turn on autodownload, or get the file elsewhere\n\n", missingfiles );
01468     }
01469   }
01470   else if ( FS_ComparePaks( clc.downloadList, sizeof( clc.downloadList ) , qtrue ) ) {
01471 
01472     Com_Printf("Need paks: %s\n", clc.downloadList );
01473 
01474         if ( *clc.downloadList ) {
01475             // if autodownloading is not enabled on the server
01476             cls.state = CA_CONNECTED;
01477             CL_NextDownload();
01478             return;
01479         }
01480 
01481     }
01482         
01483     CL_DownloadsComplete();
01484 }

Here is the call graph for this function:

void CL_InitInput void   ) 
 

Definition at line 837 of file cl_input.c.

References cl_debugMove, cl_nodelta, Cmd_AddCommand(), Cvar_Get(), IN_BackDown(), IN_BackUp(), IN_Button0Down(), IN_Button0Up(), IN_Button10Down(), IN_Button10Up(), IN_Button11Down(), IN_Button11Up(), IN_Button12Down(), IN_Button12Up(), IN_Button13Down(), IN_Button13Up(), IN_Button14Down(), IN_Button14Up(), IN_Button1Down(), IN_Button1Up(), IN_Button2Down(), IN_Button2Up(), IN_Button3Down(), IN_Button3Up(), IN_Button4Down(), IN_Button4Up(), IN_Button5Down(), IN_Button5Up(), IN_Button6Down(), IN_Button6Up(), IN_Button7Down(), IN_Button7Up(), IN_Button8Down(), IN_Button8Up(), IN_Button9Down(), IN_Button9Up(), IN_CenterView(), IN_DownDown(), IN_DownUp(), IN_ForwardDown(), IN_ForwardUp(), IN_LeftDown(), IN_LeftUp(), IN_LookdownDown(), IN_LookdownUp(), IN_LookupDown(), IN_LookupUp(), IN_MLookDown(), IN_MLookUp(), IN_MoveleftDown(), IN_MoveleftUp(), IN_MoverightDown(), IN_MoverightUp(), IN_RightDown(), IN_RightUp(), IN_SpeedDown(), IN_SpeedUp(), IN_StrafeDown(), IN_StrafeUp(), IN_UpDown(), and IN_UpUp().

Referenced by CL_Init().

00837                           {
00838     Cmd_AddCommand ("centerview",IN_CenterView);
00839 
00840     Cmd_AddCommand ("+moveup",IN_UpDown);
00841     Cmd_AddCommand ("-moveup",IN_UpUp);
00842     Cmd_AddCommand ("+movedown",IN_DownDown);
00843     Cmd_AddCommand ("-movedown",IN_DownUp);
00844     Cmd_AddCommand ("+left",IN_LeftDown);
00845     Cmd_AddCommand ("-left",IN_LeftUp);
00846     Cmd_AddCommand ("+right",IN_RightDown);
00847     Cmd_AddCommand ("-right",IN_RightUp);
00848     Cmd_AddCommand ("+forward",IN_ForwardDown);
00849     Cmd_AddCommand ("-forward",IN_ForwardUp);
00850     Cmd_AddCommand ("+back",IN_BackDown);
00851     Cmd_AddCommand ("-back",IN_BackUp);
00852     Cmd_AddCommand ("+lookup", IN_LookupDown);
00853     Cmd_AddCommand ("-lookup", IN_LookupUp);
00854     Cmd_AddCommand ("+lookdown", IN_LookdownDown);
00855     Cmd_AddCommand ("-lookdown", IN_LookdownUp);
00856     Cmd_AddCommand ("+strafe", IN_StrafeDown);
00857     Cmd_AddCommand ("-strafe", IN_StrafeUp);
00858     Cmd_AddCommand ("+moveleft", IN_MoveleftDown);
00859     Cmd_AddCommand ("-moveleft", IN_MoveleftUp);
00860     Cmd_AddCommand ("+moveright", IN_MoverightDown);
00861     Cmd_AddCommand ("-moveright", IN_MoverightUp);
00862     Cmd_AddCommand ("+speed", IN_SpeedDown);
00863     Cmd_AddCommand ("-speed", IN_SpeedUp);
00864     Cmd_AddCommand ("+attack", IN_Button0Down);
00865     Cmd_AddCommand ("-attack", IN_Button0Up);
00866     Cmd_AddCommand ("+button0", IN_Button0Down);
00867     Cmd_AddCommand ("-button0", IN_Button0Up);
00868     Cmd_AddCommand ("+button1", IN_Button1Down);
00869     Cmd_AddCommand ("-button1", IN_Button1Up);
00870     Cmd_AddCommand ("+button2", IN_Button2Down);
00871     Cmd_AddCommand ("-button2", IN_Button2Up);
00872     Cmd_AddCommand ("+button3", IN_Button3Down);
00873     Cmd_AddCommand ("-button3", IN_Button3Up);
00874     Cmd_AddCommand ("+button4", IN_Button4Down);
00875     Cmd_AddCommand ("-button4", IN_Button4Up);
00876     Cmd_AddCommand ("+button5", IN_Button5Down);
00877     Cmd_AddCommand ("-button5", IN_Button5Up);
00878     Cmd_AddCommand ("+button6", IN_Button6Down);
00879     Cmd_AddCommand ("-button6", IN_Button6Up);
00880     Cmd_AddCommand ("+button7", IN_Button7Down);
00881     Cmd_AddCommand ("-button7", IN_Button7Up);
00882     Cmd_AddCommand ("+button8", IN_Button8Down);
00883     Cmd_AddCommand ("-button8", IN_Button8Up);
00884     Cmd_AddCommand ("+button9", IN_Button9Down);
00885     Cmd_AddCommand ("-button9", IN_Button9Up);
00886     Cmd_AddCommand ("+button10", IN_Button10Down);
00887     Cmd_AddCommand ("-button10", IN_Button10Up);
00888     Cmd_AddCommand ("+button11", IN_Button11Down);
00889     Cmd_AddCommand ("-button11", IN_Button11Up);
00890     Cmd_AddCommand ("+button12", IN_Button12Down);
00891     Cmd_AddCommand ("-button12", IN_Button12Up);
00892     Cmd_AddCommand ("+button13", IN_Button13Down);
00893     Cmd_AddCommand ("-button13", IN_Button13Up);
00894     Cmd_AddCommand ("+button14", IN_Button14Down);
00895     Cmd_AddCommand ("-button14", IN_Button14Up);
00896     Cmd_AddCommand ("+mlook", IN_MLookDown);
00897     Cmd_AddCommand ("-mlook", IN_MLookUp);
00898 
00899     cl_nodelta = Cvar_Get ("cl_nodelta", "0", 0);
00900     cl_debugMove = Cvar_Get ("cl_debugMove", "0", 0);
00901 }

Here is the call graph for this function:

void CL_InitRef void   ) 
 

Definition at line 2184 of file cl_main.c.

References refimport_t::CIN_PlayCinematic, refimport_t::CIN_RunCinematic, refimport_t::CIN_UploadCinematic, refimport_t::CM_DrawDebugSurface, refimport_t::Cmd_AddCommand, refimport_t::Cmd_Argc, refimport_t::Cmd_Argv, refimport_t::Cmd_ExecuteText, refimport_t::Cmd_RemoveCommand, Com_Error(), Com_Printf(), refimport_t::Cvar_Get, Cvar_Set(), refimport_t::Cvar_Set, ERR_FATAL, refimport_t::Free, refimport_t::FS_FileExists, refimport_t::FS_FileIsInPAK, refimport_t::FS_FreeFile, refimport_t::FS_FreeFileList, refimport_t::FS_ListFiles, refimport_t::FS_ReadFile, refimport_t::FS_WriteFile, GetRefAPI(), refimport_t::Hunk_Alloc, refimport_t::Hunk_AllocateTempMemory, refimport_t::Hunk_FreeTempMemory, refimport_t::Malloc, refimport_t::Milliseconds, re, REF_API_VERSION, and ri.

Referenced by CL_Init(), and CL_Vid_Restart_f().

02184                         {
02185     refimport_t ri;
02186     refexport_t *ret;
02187 
02188     Com_Printf( "----- Initializing Renderer ----\n" );
02189 
02190     ri.Cmd_AddCommand = Cmd_AddCommand;
02191     ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
02192     ri.Cmd_Argc = Cmd_Argc;
02193     ri.Cmd_Argv = Cmd_Argv;
02194     ri.Cmd_ExecuteText = Cbuf_ExecuteText;
02195     ri.Printf = CL_RefPrintf;
02196     ri.Error = Com_Error;
02197     ri.Milliseconds = CL_ScaledMilliseconds;
02198     ri.Malloc = CL_RefMalloc;
02199     ri.Free = Z_Free;
02200 #ifdef HUNK_DEBUG
02201     ri.Hunk_AllocDebug = Hunk_AllocDebug;
02202 #else
02203     ri.Hunk_Alloc = Hunk_Alloc;
02204 #endif
02205     ri.Hunk_AllocateTempMemory = Hunk_AllocateTempMemory;
02206     ri.Hunk_FreeTempMemory = Hunk_FreeTempMemory;
02207     ri.CM_DrawDebugSurface = CM_DrawDebugSurface;
02208     ri.FS_ReadFile = FS_ReadFile;
02209     ri.FS_FreeFile = FS_FreeFile;
02210     ri.FS_WriteFile = FS_WriteFile;
02211     ri.FS_FreeFileList = FS_FreeFileList;
02212     ri.FS_ListFiles = FS_ListFiles;
02213     ri.FS_FileIsInPAK = FS_FileIsInPAK;
02214     ri.FS_FileExists = FS_FileExists;
02215     ri.Cvar_Get = Cvar_Get;
02216     ri.Cvar_Set = Cvar_Set;
02217 
02218     // cinematic stuff
02219 
02220     ri.CIN_UploadCinematic = CIN_UploadCinematic;
02221     ri.CIN_PlayCinematic = CIN_PlayCinematic;
02222     ri.CIN_RunCinematic = CIN_RunCinematic;
02223 
02224     ret = GetRefAPI( REF_API_VERSION, &ri );
02225 
02226 #if defined __USEA3D && defined __A3D_GEOM
02227     hA3Dg_ExportRenderGeom (ret);
02228 #endif
02229 
02230     Com_Printf( "-------------------------------\n");
02231 
02232     if ( !ret ) {
02233         Com_Error (ERR_FATAL, "Couldn't initialize refresh" );
02234     }
02235 
02236     re = *ret;
02237 
02238     // unpause so the cgame definately gets a snapshot and renders a frame
02239     Cvar_Set( "cl_paused", "0" );
02240 }

Here is the call graph for this function:

void CL_InitUI void   ) 
 

Definition at line 1145 of file cl_ui.c.

References CA_ACTIVE, CA_AUTHORIZING, cl_connectedToPureServer, CL_UISystemCalls(), cls, Com_Error(), Cvar_VariableValue(), ERR_DROP, ERR_FATAL, clientStatic_t::state, UI_API_VERSION, UI_GETAPIVERSION, UI_INIT, clientStatic_t::uiStarted, uivm, v, VM_Call(), VM_Create(), and vmInterpret_t.

Referenced by CL_StartHunkUsers().

01145                        {
01146     int     v;
01147     vmInterpret_t       interpret;
01148 
01149     // load the dll or bytecode
01150     if ( cl_connectedToPureServer != 0 ) {
01151         // if sv_pure is set we only allow qvms to be loaded
01152         interpret = VMI_COMPILED;
01153     }
01154     else {
01155         interpret = Cvar_VariableValue( "vm_ui" );
01156     }
01157     uivm = VM_Create( "ui", CL_UISystemCalls, interpret );
01158     if ( !uivm ) {
01159         Com_Error( ERR_FATAL, "VM_Create on UI failed" );
01160     }
01161 
01162     // sanity check
01163     v = VM_Call( uivm, UI_GETAPIVERSION );
01164     if (v == UI_OLD_API_VERSION) {
01165 //      Com_Printf(S_COLOR_YELLOW "WARNING: loading old Quake III Arena User Interface version %d\n", v );
01166         // init for this gamestate
01167         VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE));
01168     }
01169     else if (v != UI_API_VERSION) {
01170         Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION );
01171         cls.uiStarted = qfalse;
01172     }
01173     else {
01174         // init for this gamestate
01175         VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE) );
01176     }
01177 }

Here is the call graph for this function:

float CL_KeyState kbutton_t key  ) 
 

Definition at line 157 of file cl_input.c.

References kbutton_t::active, com_frameTime, Com_Printf(), kbutton_t::downtime, and kbutton_t::msec.

Referenced by CL_AdjustAngles(), and CL_KeyMove().

00157                                     {
00158     float       val;
00159     int         msec;
00160 
00161     msec = key->msec;
00162     key->msec = 0;
00163 
00164     if ( key->active ) {
00165         // still down
00166         if ( !key->downtime ) {
00167             msec = com_frameTime;
00168         } else {
00169             msec += com_frameTime - key->downtime;
00170         }
00171         key->downtime = com_frameTime;
00172     }
00173 
00174 #if 0
00175     if (msec) {
00176         Com_Printf ("%i ", msec);
00177     }
00178 #endif
00179 
00180     val = (float)msec / frame_msec;
00181     if ( val < 0 ) {
00182         val = 0;
00183     }
00184     if ( val > 1 ) {
00185         val = 1;
00186     }
00187 
00188     return val;
00189 }

Here is the call graph for this function:

void CL_LocalServers_f void   ) 
 

Definition at line 2811 of file cl_main.c.

References b, BigShort(), cls, Com_Memset(), Com_Printf(), i, j, clientStatic_t::localServers, NET_SendPacket(), NS_CLIENT, clientStatic_t::numlocalservers, clientStatic_t::pingUpdateSource, PORT_SERVER, qboolean, strlen(), and serverInfo_t::visible.

Referenced by CL_Init().

02811                                {
02812     char        *message;
02813     int         i, j;
02814     netadr_t    to;
02815 
02816     Com_Printf( "Scanning for servers on the local network...\n");
02817 
02818     // reset the list, waiting for response
02819     cls.numlocalservers = 0;
02820     cls.pingUpdateSource = AS_LOCAL;
02821 
02822     for (i = 0; i < MAX_OTHER_SERVERS; i++) {
02823         qboolean b = cls.localServers[i].visible;
02824         Com_Memset(&cls.localServers[i], 0, sizeof(cls.localServers[i]));
02825         cls.localServers[i].visible = b;
02826     }
02827     Com_Memset( &to, 0, sizeof( to ) );
02828 
02829     // The 'xxx' in the message is a challenge that will be echoed back
02830     // by the server.  We don't care about that here, but master servers
02831     // can use that to prevent spoofed server responses from invalid ip
02832     message = "\377\377\377\377getinfo xxx";
02833 
02834     // send each message twice in case one is dropped
02835     for ( i = 0 ; i < 2 ; i++ ) {
02836         // send a broadcast packet on each server port
02837         // we support multiple server ports so a single machine
02838         // can nicely run multiple servers
02839         for ( j = 0 ; j < NUM_SERVER_PORTS ; j++ ) {
02840             to.port = BigShort( (short)(PORT_SERVER + j) );
02841 
02842             to.type = NA_BROADCAST;
02843             NET_SendPacket( NS_CLIENT, strlen( message ), message, to );
02844 
02845             to.type = NA_BROADCAST_IPX;
02846             NET_SendPacket( NS_CLIENT, strlen( message ), message, to );
02847         }
02848     }
02849 }

Here is the call graph for this function:

qboolean CL_Netchan_Process netchan_t chan,
msg_t msg
 

Definition at line 158 of file cl_net_chan.c.

References CL_Netchan_Decode(), msg_t::cursize, Netchan_Process(), newsize, and qboolean.

Referenced by CL_PacketEvent().

00158                                                            {
00159     int ret;
00160 
00161     ret = Netchan_Process( chan, msg );
00162     if (!ret)
00163         return qfalse;
00164     CL_Netchan_Decode( msg );
00165     newsize += msg->cursize;
00166     return qtrue;
00167 }

Here is the call graph for this function:

void CL_Netchan_Transmit netchan_t chan,
msg_t msg
 

Definition at line 143 of file cl_net_chan.c.

References CL_Netchan_Encode(), clc_EOF, msg_t::cursize, msg_t::data, MSG_WriteByte(), and Netchan_Transmit().

Referenced by CL_WritePacket().

00143                                                         {
00144     MSG_WriteByte( msg, clc_EOF );
00145 
00146     CL_Netchan_Encode( msg );
00147     Netchan_Transmit( chan, msg->cursize, msg->data );
00148 }

Here is the call graph for this function:

void CL_Netchan_TransmitNextFragment netchan_t chan  ) 
 

Definition at line 134 of file cl_net_chan.c.

References Netchan_TransmitNextFragment().

Referenced by CL_WritePacket().

00134                                                         {
00135     Netchan_TransmitNextFragment( chan );
00136 }

Here is the call graph for this function:

void CL_NextDemo void   ) 
 

Definition at line 584 of file cl_main.c.

References Cbuf_AddText(), Cbuf_Execute(), Com_DPrintf(), Cvar_Set(), Cvar_VariableString(), MAX_STRING_CHARS, Q_strncpyz(), and v.

Referenced by CL_DemoCompleted().

00584                          {
00585     char    v[MAX_STRING_CHARS];
00586 
00587     Q_strncpyz( v, Cvar_VariableString ("nextdemo"), sizeof(v) );
00588     v[MAX_STRING_CHARS-1] = 0;
00589     Com_DPrintf("CL_NextDemo: %s\n", v );
00590     if (!v[0]) {
00591         return;
00592     }
00593 
00594     Cvar_Set ("nextdemo","");
00595     Cbuf_AddText (v);
00596     Cbuf_AddText ("\n");
00597     Cbuf_Execute();
00598 }

Here is the call graph for this function:

void CL_NextDownload void   ) 
 

Definition at line 1406 of file cl_main.c.

References CL_BeginDownload(), CL_DownloadsComplete(), clc, clientConnection_t::downloadList, clientConnection_t::downloadRestart, memmove(), s, strchr(), and strlen().

Referenced by CL_InitDownloads(), and CL_ParseDownload().

01406                            {
01407     char *s;
01408     char *remoteName, *localName;
01409 
01410     // We are looking to start a download here
01411     if (*clc.downloadList) {
01412         s = clc.downloadList;
01413 
01414         // format is:
01415         //  @remotename@localname@remotename@localname, etc.
01416 
01417         if (*s == '@')
01418             s++;
01419         remoteName = s;
01420         
01421         if ( (s = strchr(s, '@')) == NULL ) {
01422             CL_DownloadsComplete();
01423             return;
01424         }
01425 
01426         *s++ = 0;
01427         localName = s;
01428         if ( (s = strchr(s, '@')) != NULL )
01429             *s++ = 0;
01430         else
01431             s = localName + strlen(localName); // point at the nul byte
01432 
01433         CL_BeginDownload( localName, remoteName );
01434 
01435         clc.downloadRestart = qtrue;
01436 
01437         // move over the rest
01438         memmove( clc.downloadList, s, strlen(s) + 1);
01439 
01440         return;
01441     }
01442 
01443     CL_DownloadsComplete();
01444 }

Here is the call graph for this function:

void CL_ParseServerMessage msg_t msg  ) 
 

Definition at line 590 of file cl_parse.c.

References CL_ParseCommandString(), CL_ParseDownload(), CL_ParseGamestate(), CL_ParseSnapshot(), cl_shownet, clc, Com_Error(), Com_Printf(), msg_t::cursize, ERR_DROP, cvar_s::integer, MSG_Bitstream(), MSG_ReadByte(), MSG_ReadLong(), msg_t::readcount, clientConnection_t::reliableAcknowledge, clientConnection_t::reliableSequence, SHOWNET(), svc_download, svc_gamestate, svc_nop, svc_serverCommand, svc_snapshot, and svc_strings.

Referenced by CL_PacketEvent(), and CL_ReadDemoMessage().

00590                                          {
00591     int         cmd;
00592 
00593     if ( cl_shownet->integer == 1 ) {
00594         Com_Printf ("%i ",msg->cursize);
00595     } else if ( cl_shownet->integer >= 2 ) {
00596         Com_Printf ("------------------\n");
00597     }
00598 
00599     MSG_Bitstream(msg);
00600 
00601     // get the reliable sequence acknowledge number
00602     clc.reliableAcknowledge = MSG_ReadLong( msg );
00603     // 
00604     if ( clc.reliableAcknowledge < clc.reliableSequence - MAX_RELIABLE_COMMANDS ) {
00605         clc.reliableAcknowledge = clc.reliableSequence;
00606     }
00607 
00608     //
00609     // parse the message
00610     //
00611     while ( 1 ) {
00612         if ( msg->readcount > msg->cursize ) {
00613             Com_Error (ERR_DROP,"CL_ParseServerMessage: read past end of server message");
00614             break;
00615         }
00616 
00617         cmd = MSG_ReadByte( msg );
00618 
00619         if ( cmd == svc_EOF) {
00620             SHOWNET( msg, "END OF MESSAGE" );
00621             break;
00622         }
00623 
00624         if ( cl_shownet->integer >= 2 ) {
00625             if ( !svc_strings[cmd] ) {
00626                 Com_Printf( "%3i:BAD CMD %i\n", msg->readcount-1, cmd );
00627             } else {
00628                 SHOWNET( msg, svc_strings[cmd] );
00629             }
00630         }
00631     
00632     // other commands
00633         switch ( cmd ) {
00634         default:
00635             Com_Error (ERR_DROP,"CL_ParseServerMessage: Illegible server message\n");
00636             break;          
00637         case svc_nop:
00638             break;
00639         case svc_serverCommand:
00640             CL_ParseCommandString( msg );
00641             break;
00642         case svc_gamestate:
00643             CL_ParseGamestate( msg );
00644             break;
00645         case svc_snapshot:
00646             CL_ParseSnapshot( msg );
00647             break;
00648         case svc_download:
00649             CL_ParseDownload( msg );
00650             break;
00651         }
00652     }
00653 }

Here is the call graph for this function:

void CL_Ping_f void   ) 
 

Definition at line 3079 of file cl_main.c.

References ping_t::adr, CL_GetFreePing(), CL_SetServerInfoByAddress(), cls, Cmd_Argc(), Cmd_Argv(), Com_Memset(), Com_Printf(), memcpy(), NET_OutOfBandPrint(), NET_StringToAdr(), NS_CLIENT, NULL, clientStatic_t::realtime, ping_t::start, and ping_t::time.

Referenced by CL_Init().

03079                        {
03080     netadr_t    to;
03081     ping_t*     pingptr;
03082     char*       server;
03083 
03084     if ( Cmd_Argc() != 2 ) {
03085         Com_Printf( "usage: ping [server]\n");
03086         return; 
03087     }
03088 
03089     Com_Memset( &to, 0, sizeof(netadr_t) );
03090 
03091     server = Cmd_Argv(1);
03092 
03093     if ( !NET_StringToAdr( server, &to ) ) {
03094         return;
03095     }
03096 
03097     pingptr = CL_GetFreePing();
03098 
03099     memcpy( &pingptr->adr, &to, sizeof (netadr_t) );
03100     pingptr->start = cls.realtime;
03101     pingptr->time  = 0;
03102 
03103     CL_SetServerInfoByAddress(pingptr->adr, NULL, 0);
03104         
03105     NET_OutOfBandPrint( NS_CLIENT, to, "getinfo xxx" );
03106 }

Here is the call graph for this function:

void CL_PlayCinematic_f void   ) 
 

Definition at line 1665 of file cl_cin.c.

References bits, cin_cache::buf, CIN_PlayCinematic(), cinTable, CL_handle, cls, Cmd_Argv(), Com_DPrintf(), NULL, Q_stricmp(), qboolean, s, S_StopAllSounds(), SCR_RunCinematic(), SCR_StopCinematic(), SCREEN_HEIGHT, SCREEN_WIDTH, clientStatic_t::state, and cin_cache::status.

Referenced by CL_Init().

01665                               {
01666     char    *arg, *s;
01667     qboolean    holdatend;
01668     int bits = CIN_system;
01669 
01670     Com_DPrintf("CL_PlayCinematic_f\n");
01671     if (cls.state == CA_CINEMATIC) {
01672         SCR_StopCinematic();
01673     }
01674 
01675     arg = Cmd_Argv( 1 );
01676     s = Cmd_Argv(2);
01677 
01678     holdatend = qfalse;
01679     if ((s && s[0] == '1') || Q_stricmp(arg,"demoend.roq")==0 || Q_stricmp(arg,"end.roq")==0) {
01680         bits |= CIN_hold;
01681     }
01682     if (s && s[0] == '2') {
01683         bits |= CIN_loop;
01684     }
01685 
01686     S_StopAllSounds ();
01687 
01688     CL_handle = CIN_PlayCinematic( arg, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, bits );
01689     if (CL_handle >= 0) {
01690         do {
01691             SCR_RunCinematic();
01692         } while (cinTable[currentHandle].buf == NULL && cinTable[currentHandle].status == FMV_PLAY);        // wait for first frame (load codebook and sound)
01693     }
01694 }

Here is the call graph for this function:

void CL_ReadDemoMessage void   ) 
 

Definition at line 416 of file cl_main.c.

References byte, CL_DemoCompleted(), CL_ParseServerMessage(), clc, cls, Com_Error(), Com_Printf(), msg_t::cursize, msg_t::data, clientConnection_t::demofile, ERR_DROP, FS_Read(), clientConnection_t::lastPacketTime, LittleLong(), msg_t::maxsize, MSG_Init(), r, msg_t::readcount, clientStatic_t::realtime, s, and clientConnection_t::serverMessageSequence.

Referenced by CL_PlayDemo_f(), and CL_SetCGameTime().

00416                                 {
00417     int         r;
00418     msg_t       buf;
00419     byte        bufData[ MAX_MSGLEN ];
00420     int         s;
00421 
00422     if ( !clc.demofile ) {
00423         CL_DemoCompleted ();
00424         return;
00425     }
00426 
00427     // get the sequence number
00428     r = FS_Read( &s, 4, clc.demofile);
00429     if ( r != 4 ) {
00430         CL_DemoCompleted ();
00431         return;
00432     }
00433     clc.serverMessageSequence = LittleLong( s );
00434 
00435     // init the message
00436     MSG_Init( &buf, bufData, sizeof( bufData ) );
00437 
00438     // get the length
00439     r = FS_Read (&buf.cursize, 4, clc.demofile);
00440     if ( r != 4 ) {
00441         CL_DemoCompleted ();
00442         return;
00443     }
00444     buf.cursize = LittleLong( buf.cursize );
00445     if ( buf.cursize == -1 ) {
00446         CL_DemoCompleted ();
00447         return;
00448     }
00449     if ( buf.cursize > buf.maxsize ) {
00450         Com_Error (ERR_DROP, "CL_ReadDemoMessage: demoMsglen > MAX_MSGLEN");
00451     }
00452     r = FS_Read( buf.data, buf.cursize, clc.demofile );
00453     if ( r != buf.cursize ) {
00454         Com_Printf( "Demo file was truncated.\n");
00455         CL_DemoCompleted ();
00456         return;
00457     }
00458 
00459     clc.lastPacketTime = cls.realtime;
00460     buf.readcount = 0;
00461     CL_ParseServerMessage( &buf );
00462 }

Here is the call graph for this function:

void CL_ReadPackets void   ) 
 

void CL_SendCmd void   ) 
 

Definition at line 807 of file cl_input.c.

References CL_CreateNewCommands(), cl_paused, CL_ReadyToSendPacket(), cl_showSend, CL_WritePacket(), cls, Com_Printf(), com_sv_running, cvar_s::integer, clientStatic_t::state, and sv_paused.

Referenced by CL_Frame().

00807                         {
00808     // don't send any message if not connected
00809     if ( cls.state < CA_CONNECTED ) {
00810         return;
00811     }
00812 
00813     // don't send commands if paused
00814     if ( com_sv_running->integer && sv_paused->integer && cl_paused->integer ) {
00815         return;
00816     }
00817 
00818     // we create commands even if a demo is playing,
00819     CL_CreateNewCommands();
00820 
00821     // don't send a packet if the last packet was sent too recently
00822     if ( !CL_ReadyToSendPacket() ) {
00823         if ( cl_showSend->integer ) {
00824             Com_Printf( ". " );
00825         }
00826         return;
00827     }
00828 
00829     CL_WritePacket();
00830 }

Here is the call graph for this function:

void CL_ServerInfoPacket netadr_t  from,
msg_t msg
 

Definition at line 2513 of file cl_main.c.

References serverInfo_t::adr, ping_t::adr, atoi, cl_pinglist, CL_SetServerInfoByAddress(), serverInfo_t::clients, cls, Com_DPrintf(), Com_Printf(), serverInfo_t::game, serverInfo_t::gameType, serverInfo_t::hostName, i, Info_SetValueForKey(), Info_ValueForKey(), clientStatic_t::localServers, serverInfo_t::mapName, MAX_INFO_STRING, serverInfo_t::maxClients, serverInfo_t::maxPing, serverInfo_t::minPing, MSG_ReadString(), NA_BROADCAST, NA_BROADCAST_IPX, NA_IP, NA_IPX, NET_AdrToString(), NET_CompareAdr(), serverInfo_t::netType, clientStatic_t::numlocalservers, serverInfo_t::ping, clientStatic_t::pingUpdateSource, netadr_t::port, serverInfo_t::punkbuster, Q_strncpyz(), clientStatic_t::realtime, ping_t::start, strlen(), strncat(), time(), ping_t::time, type, netadr_t::type, and va().

Referenced by CL_ConnectionlessPacket().

02513                                                       {
02514     int     i, type;
02515     char    info[MAX_INFO_STRING];
02516     char*   str;
02517     char    *infoString;
02518     int     prot;
02519 
02520     infoString = MSG_ReadString( msg );
02521 
02522     // if this isn't the correct protocol version, ignore it
02523     prot = atoi( Info_ValueForKey( infoString, "protocol" ) );
02524     if ( prot != PROTOCOL_VERSION ) {
02525         Com_DPrintf( "Different protocol info packet: %s\n", infoString );
02526         return;
02527     }
02528 
02529     // iterate servers waiting for ping response
02530     for (i=0; i<MAX_PINGREQUESTS; i++)
02531     {
02532         if ( cl_pinglist[i].adr.port && !cl_pinglist[i].time && NET_CompareAdr( from, cl_pinglist[i].adr ) )
02533         {
02534             // calc ping time
02535             cl_pinglist[i].time = cls.realtime - cl_pinglist[i].start + 1;
02536             Com_DPrintf( "ping time %dms from %s\n", cl_pinglist[i].time, NET_AdrToString( from ) );
02537 
02538             // save of info
02539             Q_strncpyz( cl_pinglist[i].info, infoString, sizeof( cl_pinglist[i].info ) );
02540 
02541             // tack on the net type
02542             // NOTE: make sure these types are in sync with the netnames strings in the UI
02543             switch (from.type)
02544             {
02545                 case NA_BROADCAST:
02546                 case NA_IP:
02547                     str = "udp";
02548                     type = 1;
02549                     break;
02550 
02551                 case NA_IPX:
02552                 case NA_BROADCAST_IPX:
02553                     str = "ipx";
02554                     type = 2;
02555                     break;
02556 
02557                 default:
02558                     str = "???";
02559                     type = 0;
02560                     break;
02561             }
02562             Info_SetValueForKey( cl_pinglist[i].info, "nettype", va("%d", type) );
02563             CL_SetServerInfoByAddress(from, infoString, cl_pinglist[i].time);
02564 
02565             return;
02566         }
02567     }
02568 
02569     // if not just sent a local broadcast or pinging local servers
02570     if (cls.pingUpdateSource != AS_LOCAL) {
02571         return;
02572     }
02573 
02574     for ( i = 0 ; i < MAX_OTHER_SERVERS ; i++ ) {
02575         // empty slot
02576         if ( cls.localServers[i].adr.port == 0 ) {
02577             break;
02578         }
02579 
02580         // avoid duplicate
02581         if ( NET_CompareAdr( from, cls.localServers[i].adr ) ) {
02582             return;
02583         }
02584     }
02585 
02586     if ( i == MAX_OTHER_SERVERS ) {
02587         Com_DPrintf( "MAX_OTHER_SERVERS hit, dropping infoResponse\n" );
02588         return;
02589     }
02590 
02591     // add this to the list
02592     cls.numlocalservers = i+1;
02593     cls.localServers[i].adr = from;
02594     cls.localServers[i].clients = 0;
02595     cls.localServers[i].hostName[0] = '\0';
02596     cls.localServers[i].mapName[0] = '\0';
02597     cls.localServers[i].maxClients = 0;
02598     cls.localServers[i].maxPing = 0;
02599     cls.localServers[i].minPing = 0;
02600     cls.localServers[i].ping = -1;
02601     cls.localServers[i].game[0] = '\0';
02602     cls.localServers[i].gameType = 0;
02603     cls.localServers[i].netType = from.type;
02604     cls.localServers[i].punkbuster = 0;
02605                                      
02606     Q_strncpyz( info, MSG_ReadString( msg ), MAX_INFO_STRING );
02607     if (strlen(info)) {
02608         if (info[strlen(info)-1] != '\n') {
02609             strncat(info, "\n", sizeof(info));
02610         }
02611         Com_Printf( "%s: %s", NET_AdrToString( from ), info );
02612     }
02613 }

Here is the call graph for this function:

int CL_ServerStatus char *  serverAddress,
char *  serverStatusString,
int  maxLen
 

Definition at line 2655 of file cl_main.c.

References serverStatus_s::address, CL_GetServerStatus(), cl_serverStatusList, cl_serverStatusResendTime, Com_Milliseconds(), i, cvar_s::integer, NET_CompareAdr(), NET_OutOfBandPrint(), NET_StringToAdr(), NS_CLIENT, serverStatus_s::pending, netadr_t::port, serverStatus_s::print, Q_strncpyz(), serverStatus_s::retrieved, serverStatus_t, serverStatus_s::startTime, serverStatus_s::string, and serverStatus_s::time.

Referenced by LAN_GetServerStatus().

02655                                                                                  {
02656     int i;
02657     netadr_t    to;
02658     serverStatus_t *serverStatus;
02659 
02660     // if no server address then reset all server status requests
02661     if ( !serverAddress ) {
02662         for (i = 0; i < MAX_SERVERSTATUSREQUESTS; i++) {
02663             cl_serverStatusList[i].address.port = 0;
02664             cl_serverStatusList[i].retrieved = qtrue;
02665         }
02666         return qfalse;
02667     }
02668     // get the address
02669     if ( !NET_StringToAdr( serverAddress, &to ) ) {
02670         return qfalse;
02671     }
02672     serverStatus = CL_GetServerStatus( to );
02673     // if no server status string then reset the server status request for this address
02674     if ( !serverStatusString ) {
02675         serverStatus->retrieved = qtrue;
02676         return qfalse;
02677     }
02678 
02679     // if this server status request has the same address
02680     if ( NET_CompareAdr( to, serverStatus->address) ) {
02681         // if we recieved an response for this server status request
02682         if (!serverStatus->pending) {
02683             Q_strncpyz(serverStatusString, serverStatus->string, maxLen);
02684             serverStatus->retrieved = qtrue;
02685             serverStatus->startTime = 0;
02686             return qtrue;
02687         }
02688         // resend the request regularly
02689         else if ( serverStatus->startTime < Com_Milliseconds() - cl_serverStatusResendTime->integer ) {
02690             serverStatus->print = qfalse;
02691             serverStatus->pending = qtrue;
02692             serverStatus->retrieved = qfalse;
02693             serverStatus->time = 0;
02694             serverStatus->startTime = Com_Milliseconds();
02695             NET_OutOfBandPrint( NS_CLIENT, to, "getstatus" );
02696             return qfalse;
02697         }
02698     }
02699     // if retrieved
02700     else if ( serverStatus->retrieved ) {
02701         serverStatus->address = to;
02702         serverStatus->print = qfalse;
02703         serverStatus->pending = qtrue;
02704         serverStatus->retrieved = qfalse;
02705         serverStatus->startTime = Com_Milliseconds();
02706         serverStatus->time = 0;
02707         NET_OutOfBandPrint( NS_CLIENT, to, "getstatus" );
02708         return qfalse;
02709     }
02710     return qfalse;
02711 }

Here is the call graph for this function:

void CL_SetCGameTime void   ) 
 

Definition at line 915 of file cl_cgame.c.

References cl, CL_AdjustTimeDelta(), CL_FirstSnapshot(), cl_freezeDemo, cl_paused, CL_ReadDemoMessage(), cl_timedemo, cl_timeNudge, clc, cls, Com_Error(), com_sv_running, clientConnection_t::demoplaying, ERR_DROP, clientActive_t::extrapolatedSnapshot, clientConnection_t::firstDemoFrameSkipped, cvar_s::integer, clientActive_t::newSnapshots, clientActive_t::oldFrameServerTime, clientActive_t::oldServerTime, clientStatic_t::realtime, clientActive_t::serverTime, clSnapshot_t::serverTime, clientActive_t::serverTimeDelta, clientActive_t::snap, clientStatic_t::state, sv_paused, Sys_Milliseconds(), clientConnection_t::timeDemoBaseTime, clientConnection_t::timeDemoFrames, clientConnection_t::timeDemoStart, and clSnapshot_t::valid.

Referenced by CL_Frame().

00915                              {
00916     // getting a valid frame message ends the connection process
00917     if ( cls.state != CA_ACTIVE ) {
00918         if ( cls.state != CA_PRIMED ) {
00919             return;
00920         }
00921         if ( clc.demoplaying ) {
00922             // we shouldn't get the first snapshot on the same frame
00923             // as the gamestate, because it causes a bad time skip
00924             if ( !clc.firstDemoFrameSkipped ) {
00925                 clc.firstDemoFrameSkipped = qtrue;
00926                 return;
00927             }
00928             CL_ReadDemoMessage();
00929         }
00930         if ( cl.newSnapshots ) {
00931             cl.newSnapshots = qfalse;
00932             CL_FirstSnapshot();
00933         }
00934         if ( cls.state != CA_ACTIVE ) {
00935             return;
00936         }
00937     }   
00938 
00939     // if we have gotten to this point, cl.snap is guaranteed to be valid
00940     if ( !cl.snap.valid ) {
00941         Com_Error( ERR_DROP, "CL_SetCGameTime: !cl.snap.valid" );
00942     }
00943 
00944     // allow pause in single player
00945     if ( sv_paused->integer && cl_paused->integer && com_sv_running->integer ) {
00946         // paused
00947         return;
00948     }
00949 
00950     if ( cl.snap.serverTime < cl.oldFrameServerTime ) {
00951         Com_Error( ERR_DROP, "cl.snap.serverTime < cl.oldFrameServerTime" );
00952     }
00953     cl.oldFrameServerTime = cl.snap.serverTime;
00954 
00955 
00956     // get our current view of time
00957 
00958     if ( clc.demoplaying && cl_freezeDemo->integer ) {
00959         // cl_freezeDemo is used to lock a demo in place for single frame advances
00960 
00961     } else {
00962         // cl_timeNudge is a user adjustable cvar that allows more
00963         // or less latency to be added in the interest of better 
00964         // smoothness or better responsiveness.
00965         int tn;
00966         
00967         tn = cl_timeNudge->integer;
00968         if (tn<-30) {
00969             tn = -30;
00970         } else if (tn>30) {
00971             tn = 30;
00972         }
00973 
00974         cl.serverTime = cls.realtime + cl.serverTimeDelta - tn;
00975 
00976         // guarantee that time will never flow backwards, even if
00977         // serverTimeDelta made an adjustment or cl_timeNudge was changed
00978         if ( cl.serverTime < cl.oldServerTime ) {
00979             cl.serverTime = cl.oldServerTime;
00980         }
00981         cl.oldServerTime = cl.serverTime;
00982 
00983         // note if we are almost past the latest frame (without timeNudge),
00984         // so we will try and adjust back a bit when the next snapshot arrives
00985         if ( cls.realtime + cl.serverTimeDelta >= cl.snap.serverTime - 5 ) {
00986             cl.extrapolatedSnapshot = qtrue;
00987         }
00988     }
00989 
00990     // if we have gotten new snapshots, drift serverTimeDelta
00991     // don't do this every frame, or a period of packet loss would
00992     // make a huge adjustment
00993     if ( cl.newSnapshots ) {
00994         CL_AdjustTimeDelta();
00995     }
00996 
00997     if ( !clc.demoplaying ) {
00998         return;
00999     }
01000 
01001     // if we are playing a demo back, we can just keep reading
01002     // messages from the demo file until the cgame definately
01003     // has valid snapshots to interpolate between
01004 
01005     // a timedemo will always use a deterministic set of time samples
01006     // no matter what speed machine it is run on,
01007     // while a normal demo may have different time samples
01008     // each time it is played back
01009     if ( cl_timedemo->integer ) {
01010         if (!clc.timeDemoStart) {
01011             clc.timeDemoStart = Sys_Milliseconds();
01012         }
01013         clc.timeDemoFrames++;
01014         cl.serverTime = clc.timeDemoBaseTime + clc.timeDemoFrames * 50;
01015     }
01016 
01017     while ( cl.serverTime >= cl.snap.serverTime ) {
01018         // feed another messag, which should change
01019         // the contents of cl.snap
01020         CL_ReadDemoMessage();
01021         if ( cls.state != CA_ACTIVE ) {
01022             return;     // end of demo
01023         }
01024     }
01025 
01026 }

Here is the call graph for this function:

void CL_ShaderStateChanged void   ) 
 

void CL_ShutdownAll void   ) 
 

Definition at line 608 of file cl_main.c.

00608                           {
00609 
00610     // clear sounds
00611     S_DisableSounds();
00612     // shutdown CGame
00613     CL_ShutdownCGame();
00614     // shutdown UI
00615     CL_ShutdownUI();
00616 
00617     // shutdown the renderer
00618     if ( re.Shutdown ) {
00619         re.Shutdown( qfalse );      // don't destroy window or context
00620     }
00621 
00622     cls.uiStarted = qfalse;
00623     cls.cgameStarted = qfalse;
00624     cls.rendererStarted = qfalse;
00625     cls.soundRegistered = qfalse;
00626 }

void CL_ShutdownCGame void   ) 
 

Definition at line 389 of file cl_cgame.c.

00389                               {
00390     cls.keyCatchers &= ~KEYCATCH_CGAME;
00391     cls.cgameStarted = qfalse;
00392     if ( !cgvm ) {
00393         return;
00394     }
00395     VM_Call( cgvm, CG_SHUTDOWN );
00396     VM_Free( cgvm );
00397     cgvm = NULL;
00398 }

void CL_ShutdownRef void   ) 
 

Definition at line 2103 of file cl_main.c.

References Com_Memset(), qtrue, re, and refexport_t::Shutdown.

Referenced by CL_Shutdown(), and CL_Vid_Restart_f().

02103                             {
02104     if ( !re.Shutdown ) {
02105         return;
02106     }
02107     re.Shutdown( qtrue );
02108     Com_Memset( &re, 0, sizeof( re ) );
02109 }

Here is the call graph for this function:

void CL_ShutdownUI void   ) 
 

Definition at line 1127 of file cl_ui.c.

01127                            {
01128     cls.keyCatchers &= ~KEYCATCH_UI;
01129     cls.uiStarted = qfalse;
01130     if ( !uivm ) {
01131         return;
01132     }
01133     VM_Call( uivm, UI_SHUTDOWN );
01134     VM_Free( uivm );
01135     uivm = NULL;
01136 }

void CL_Snd_Restart_f void   ) 
 

Definition at line 1247 of file cl_main.c.

References CL_Vid_Restart_f(), S_Init(), and S_Shutdown().

Referenced by CL_Init().

01247                               {
01248     S_Shutdown();
01249     S_Init();
01250 
01251     CL_Vid_Restart_f();
01252 }

Here is the call graph for this function:

void CL_StartDemoLoop void   ) 
 

Definition at line 570 of file cl_main.c.

References Cbuf_AddText(), cls, and clientStatic_t::keyCatchers.

Referenced by Con_ToggleConsole_f().

00570                               {
00571     // start the demo loop again
00572     Cbuf_AddText ("d1\n");
00573     cls.keyCatchers = 0;
00574 }

Here is the call graph for this function:

void CL_StartHunkUsers void   ) 
 

Definition at line 2136 of file cl_main.c.

02136                                {
02137     if (!com_cl_running) {
02138         return;
02139     }
02140 
02141     if ( !com_cl_running->integer ) {
02142         return;
02143     }
02144 
02145     if ( !cls.rendererStarted ) {
02146         cls.rendererStarted = qtrue;
02147         CL_InitRenderer();
02148     }
02149 
02150     if ( !cls.soundStarted ) {
02151         cls.soundStarted = qtrue;
02152         S_Init();
02153     }
02154 
02155     if ( !cls.soundRegistered ) {
02156         cls.soundRegistered = qtrue;
02157         S_BeginRegistration();
02158     }
02159 
02160     if ( !cls.uiStarted ) {
02161         cls.uiStarted = qtrue;
02162         CL_InitUI();
02163     }
02164 }

void CL_SystemInfoChanged void   ) 
 

Definition at line 327 of file cl_parse.c.

References atoi, cl, cl_connectedToPureServer, clc, Cvar_Set(), Cvar_SetCheatState(), Cvar_VariableString(), Cvar_VariableValue(), clientConnection_t::demoplaying, FS_PureServerSetLoadedPaks(), FS_PureServerSetReferencedPaks(), clientActive_t::gameState, Info_NextPair(), Info_ValueForKey(), Q_stricmp(), qboolean, s, clientActive_t::serverId, gameState_t::stringData, gameState_t::stringOffsets, t, and value.

Referenced by CL_ConfigstringModified(), and CL_ParseGamestate().

00327                                   {
00328     char            *systemInfo;
00329     const char      *s, *t;
00330     char            key[BIG_INFO_KEY];
00331     char            value[BIG_INFO_VALUE];
00332     qboolean        gameSet;
00333 
00334     systemInfo = cl.gameState.stringData + cl.gameState.stringOffsets[ CS_SYSTEMINFO ];
00335     // NOTE TTimo:
00336     // when the serverId changes, any further messages we send to the server will use this new serverId
00337     // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=475
00338     // in some cases, outdated cp commands might get sent with this news serverId
00339     cl.serverId = atoi( Info_ValueForKey( systemInfo, "sv_serverid" ) );
00340 
00341     // don't set any vars when playing a demo
00342     if ( clc.demoplaying ) {
00343         return;
00344     }
00345 
00346     s = Info_ValueForKey( systemInfo, "sv_cheats" );
00347     if ( atoi(s) == 0 ) {
00348         Cvar_SetCheatState();
00349     }
00350 
00351     // check pure server string
00352     s = Info_ValueForKey( systemInfo, "sv_paks" );
00353     t = Info_ValueForKey( systemInfo, "sv_pakNames" );
00354     FS_PureServerSetLoadedPaks( s, t );
00355 
00356     s = Info_ValueForKey( systemInfo, "sv_referencedPaks" );
00357     t = Info_ValueForKey( systemInfo, "sv_referencedPakNames" );
00358     FS_PureServerSetReferencedPaks( s, t );
00359 
00360     gameSet = qfalse;
00361     // scan through all the variables in the systeminfo and locally set cvars to match
00362     s = systemInfo;
00363     while ( s ) {
00364         Info_NextPair( &s, key, value );
00365         if ( !key[0] ) {
00366             break;
00367         }
00368         // ehw!
00369         if ( !Q_stricmp( key, "fs_game" ) ) {
00370             gameSet = qtrue;
00371         }
00372 
00373         Cvar_Set( key, value );
00374     }
00375     // if game folder should not be set and it is set at the client side
00376     if ( !gameSet && *Cvar_VariableString("fs_game") ) {
00377         Cvar_Set( "fs_game", "" );
00378     }
00379     cl_connectedToPureServer = Cvar_VariableValue( "sv_pure" );
00380 }

Here is the call graph for this function:

qboolean CL_UpdateVisiblePings_f int  source  ) 
 

Definition at line 3113 of file cl_main.c.

References ping_t::adr, AS_FAVORITES, AS_GLOBAL, AS_LOCAL, AS_MPLAYER, CL_ClearPing(), CL_GetPing(), CL_GetPingQueueCount(), CL_InitServerInfo(), cl_pinglist, cls, clientStatic_t::favoriteServers, clientStatic_t::globalServerAddresses, clientStatic_t::globalServers, i, j, clientStatic_t::localServers, max, MAX_GLOBAL_SERVERS, MAX_STRING_CHARS, memcpy(), clientStatic_t::mplayerServers, NET_CompareAdr(), NET_OutOfBandPrint(), NS_CLIENT, clientStatic_t::numfavoriteservers, clientStatic_t::numGlobalServerAddresses, clientStatic_t::numglobalservers, clientStatic_t::numlocalservers, clientStatic_t::nummplayerservers, serverInfo_t::ping, clientStatic_t::pingUpdateSource, netadr_t::port, qboolean, clientStatic_t::realtime, source, ping_t::start, ping_t::time, and serverInfo_t::visible.

Referenced by LAN_UpdateVisiblePings().

03113                                              {
03114     int         slots, i;
03115     char        buff[MAX_STRING_CHARS];
03116     int         pingTime;
03117     int         max;
03118     qboolean status = qfalse;
03119 
03120     if (source < 0 || source > AS_FAVORITES) {
03121         return qfalse;
03122     }
03123 
03124     cls.pingUpdateSource = source;
03125 
03126     slots = CL_GetPingQueueCount();
03127     if (slots < MAX_PINGREQUESTS) {
03128         serverInfo_t *server = NULL;
03129 
03130         max = (source == AS_GLOBAL) ? MAX_GLOBAL_SERVERS : MAX_OTHER_SERVERS;
03131         switch (source) {
03132             case AS_LOCAL :
03133                 server = &cls.localServers[0];
03134                 max = cls.numlocalservers;
03135             break;
03136             case AS_MPLAYER :
03137                 server = &cls.mplayerServers[0];
03138                 max = cls.nummplayerservers;
03139             break;
03140             case AS_GLOBAL :
03141                 server = &cls.globalServers[0];
03142                 max = cls.numglobalservers;
03143             break;
03144             case AS_FAVORITES :
03145                 server = &cls.favoriteServers[0];
03146                 max = cls.numfavoriteservers;
03147             break;
03148         }
03149         for (i = 0; i < max; i++) {
03150             if (server[i].visible) {
03151                 if (server[i].ping == -1) {
03152                     int j;
03153 
03154                     if (slots >= MAX_PINGREQUESTS) {
03155                         break;
03156                     }
03157                     for (j = 0; j < MAX_PINGREQUESTS; j++) {
03158                         if (!cl_pinglist[j].adr.port) {
03159                             continue;
03160                         }
03161                         if (NET_CompareAdr( cl_pinglist[j].adr, server[i].adr)) {
03162                             // already on the list
03163                             break;
03164                         }
03165                     }
03166                     if (j >= MAX_PINGREQUESTS) {
03167                         status = qtrue;
03168                         for (j = 0; j < MAX_PINGREQUESTS; j++) {
03169                             if (!cl_pinglist[j].adr.port) {
03170                                 break;
03171                             }
03172                         }
03173                         memcpy(&cl_pinglist[j].adr, &server[i].adr, sizeof(netadr_t));
03174                         cl_pinglist[j].start = cls.realtime;
03175                         cl_pinglist[j].time = 0;
03176                         NET_OutOfBandPrint( NS_CLIENT, cl_pinglist[j].adr, "getinfo xxx" );
03177                         slots++;
03178                     }
03179                 }
03180                 // if the server has a ping higher than cl_maxPing or
03181                 // the ping packet got lost
03182                 else if (server[i].ping == 0) {
03183                     // if we are updating global servers
03184                     if (source == AS_GLOBAL) {
03185                         //
03186                         if ( cls.numGlobalServerAddresses > 0 ) {
03187                             // overwrite this server with one from the additional global servers
03188                             cls.numGlobalServerAddresses--;
03189                             CL_InitServerInfo(&server[i], &cls.globalServerAddresses[cls.numGlobalServerAddresses]);
03190                             // NOTE: the server[i].visible flag stays untouched
03191                         }
03192                     }
03193                 }
03194             }
03195         }
03196     } 
03197 
03198     if (slots) {
03199         status = qtrue;
03200     }
03201     for (i = 0; i < MAX_PINGREQUESTS; i++) {
03202         if (!cl_pinglist[i].adr.port) {
03203             continue;
03204         }
03205         CL_GetPing( i, buff, MAX_STRING_CHARS, &pingTime );
03206         if (pingTime != 0) {
03207             CL_ClearPing(i);
03208             status = qtrue;
03209         }
03210     }
03211 
03212     return status;
03213 }

Here is the call graph for this function:

void CL_VerifyCode void   ) 
 

void CL_Vid_Restart_f void   ) 
 

Definition at line 1188 of file cl_main.c.

References CA_CONNECTED, clientStatic_t::cgameStarted, clientConnection_t::checksumFeed, CL_InitCGame(), CL_InitRef(), CL_ResetPureClientAtServer(), CL_SendPureChecksums(), CL_ShutdownCGame(), CL_ShutdownRef(), CL_ShutdownUI(), CL_StartHunkUsers(), clc, cls, com_sv_running, Cvar_Set(), FS_CGAME_REF, FS_ClearPakReferences(), FS_ConditionalRestart(), FS_UI_REF, Hunk_Clear(), Hunk_ClearToMark(), cvar_s::integer, clientStatic_t::rendererStarted, S_StopAllSounds(), clientStatic_t::soundRegistered, clientStatic_t::state, and clientStatic_t::uiStarted.

Referenced by CL_Init(), and CL_Snd_Restart_f().

01188                               {
01189 
01190     // don't let them loop during the restart
01191     S_StopAllSounds();
01192     // shutdown the UI
01193     CL_ShutdownUI();
01194     // shutdown the CGame
01195     CL_ShutdownCGame();
01196     // shutdown the renderer and clear the renderer interface
01197     CL_ShutdownRef();
01198     // client is no longer pure untill new checksums are sent
01199     CL_ResetPureClientAtServer();
01200     // clear pak references
01201     FS_ClearPakReferences( FS_UI_REF | FS_CGAME_REF );
01202     // reinitialize the filesystem if the game directory or checksum has changed
01203     FS_ConditionalRestart( clc.checksumFeed );
01204 
01205     cls.rendererStarted = qfalse;
01206     cls.uiStarted = qfalse;
01207     cls.cgameStarted = qfalse;
01208     cls.soundRegistered = qfalse;
01209 
01210     // unpause so the cgame definately gets a snapshot and renders a frame
01211     Cvar_Set( "cl_paused", "0" );
01212 
01213     // if not running a server clear the whole hunk
01214     if ( !com_sv_running->integer ) {
01215         // clear the whole hunk
01216         Hunk_Clear();
01217     }
01218     else {
01219         // clear all the client data on the hunk
01220         Hunk_ClearToMark();
01221     }
01222 
01223     // initialize the renderer interface
01224     CL_InitRef();
01225 
01226     // startup all the client stuff
01227     CL_StartHunkUsers();
01228 
01229     // start the cgame if connected
01230     if ( cls.state > CA_CONNECTED && cls.state != CA_CINEMATIC ) {
01231         cls.cgameStarted = qtrue;
01232         CL_InitCGame();
01233         // send pure checksums
01234         CL_SendPureChecksums();
01235     }
01236 }

Here is the call graph for this function:

void CL_WritePacket void   ) 
 

Definition at line 688 of file cl_input.c.

References byte, clientConnection_t::checksumFeed, cl, CL_Netchan_Transmit(), CL_Netchan_TransmitNextFragment(), cl_nodelta, cl_packetdup, cl_showSend, clc, clc_clientCommand, clc_move, clc_moveNoDelta, cls, clientActive_t::cmdNumber, clientActive_t::cmds, Com_DPrintf(), Com_HashKey(), Com_Memset(), Com_Printf(), count, msg_t::cursize, Cvar_Set(), data, clientConnection_t::demoplaying, clientConnection_t::demowaiting, i, cvar_s::integer, j, clientConnection_t::lastPacketSentTime, MAX_RELIABLE_COMMANDS, clSnapshot_t::messageNum, MSG_Bitstream(), MSG_Init(), MSG_WriteByte(), MSG_WriteDeltaUsercmdKey(), MSG_WriteLong(), MSG_WriteString(), clientConnection_t::netchan, netchan_t::outgoingSequence, clientActive_t::outPackets, outPacket_t::p_cmdNumber, outPacket_t::p_realtime, outPacket_t::p_serverTime, clientStatic_t::realtime, clientConnection_t::reliableAcknowledge, clientConnection_t::reliableCommands, clientConnection_t::reliableSequence, clientConnection_t::serverCommands, clientConnection_t::serverCommandSequence, clientActive_t::serverId, clientConnection_t::serverMessageSequence, usercmd_s::serverTime, clientActive_t::snap, clientStatic_t::state, netchan_t::unsentFragments, usercmd_t, and clSnapshot_t::valid.

Referenced by CL_Disconnect(), CL_DownloadsComplete(), CL_ParseDownload(), and CL_SendCmd().

00688                             {
00689     msg_t       buf;
00690     byte        data[MAX_MSGLEN];
00691     int         i, j;
00692     usercmd_t   *cmd, *oldcmd;
00693     usercmd_t   nullcmd;
00694     int         packetNum;
00695     int         oldPacketNum;
00696     int         count, key;
00697 
00698     // don't send anything if playing back a demo
00699     if ( clc.demoplaying || cls.state == CA_CINEMATIC ) {
00700         return;
00701     }
00702 
00703     Com_Memset( &nullcmd, 0, sizeof(nullcmd) );
00704     oldcmd = &nullcmd;
00705 
00706     MSG_Init( &buf, data, sizeof(data) );
00707 
00708     MSG_Bitstream( &buf );
00709     // write the current serverId so the server
00710     // can tell if this is from the current gameState
00711     MSG_WriteLong( &buf, cl.serverId );
00712 
00713     // write the last message we received, which can
00714     // be used for delta compression, and is also used
00715     // to tell if we dropped a gamestate
00716     MSG_WriteLong( &buf, clc.serverMessageSequence );
00717 
00718     // write the last reliable message we received
00719     MSG_WriteLong( &buf, clc.serverCommandSequence );
00720 
00721     // write any unacknowledged clientCommands
00722     for ( i = clc.reliableAcknowledge + 1 ; i <= clc.reliableSequence ; i++ ) {
00723         MSG_WriteByte( &buf, clc_clientCommand );
00724         MSG_WriteLong( &buf, i );
00725         MSG_WriteString( &buf, clc.reliableCommands[ i & (MAX_RELIABLE_COMMANDS-1) ] );
00726     }
00727 
00728     // we want to send all the usercmds that were generated in the last
00729     // few packet, so even if a couple packets are dropped in a row,
00730     // all the cmds will make it to the server
00731     if ( cl_packetdup->integer < 0 ) {
00732         Cvar_Set( "cl_packetdup", "0" );
00733     } else if ( cl_packetdup->integer > 5 ) {
00734         Cvar_Set( "cl_packetdup", "5" );
00735     }
00736     oldPacketNum = (clc.netchan.outgoingSequence - 1 - cl_packetdup->integer) & PACKET_MASK;
00737     count = cl.cmdNumber - cl.outPackets[ oldPacketNum ].p_cmdNumber;
00738     if ( count > MAX_PACKET_USERCMDS ) {
00739         count = MAX_PACKET_USERCMDS;
00740         Com_Printf("MAX_PACKET_USERCMDS\n");
00741     }
00742     if ( count >= 1 ) {
00743         if ( cl_showSend->integer ) {
00744             Com_Printf( "(%i)", count );
00745         }
00746 
00747         // begin a client move command
00748         if ( cl_nodelta->integer || !cl.snap.valid || clc.demowaiting
00749             || clc.serverMessageSequence != cl.snap.messageNum ) {
00750             MSG_WriteByte (&buf, clc_moveNoDelta);
00751         } else {
00752             MSG_WriteByte (&buf, clc_move);
00753         }
00754 
00755         // write the command count
00756         MSG_WriteByte( &buf, count );
00757 
00758         // use the checksum feed in the key
00759         key = clc.checksumFeed;
00760         // also use the message acknowledge
00761         key ^= clc.serverMessageSequence;
00762         // also use the last acknowledged server command in the key
00763         key ^= Com_HashKey(clc.serverCommands[ clc.serverCommandSequence & (MAX_RELIABLE_COMMANDS-1) ], 32);
00764 
00765         // write all the commands, including the predicted command
00766         for ( i = 0 ; i < count ; i++ ) {
00767             j = (cl.cmdNumber - count + i + 1) & CMD_MASK;
00768             cmd = &cl.cmds[j];
00769             MSG_WriteDeltaUsercmdKey (&buf, key, oldcmd, cmd);
00770             oldcmd = cmd;
00771         }
00772     }
00773 
00774     //
00775     // deliver the message
00776     //
00777     packetNum = clc.netchan.outgoingSequence & PACKET_MASK;
00778     cl.outPackets[ packetNum ].p_realtime = cls.realtime;
00779     cl.outPackets[ packetNum ].p_serverTime = oldcmd->serverTime;
00780     cl.outPackets[ packetNum ].p_cmdNumber = cl.cmdNumber;
00781     clc.lastPacketSentTime = cls.realtime;
00782 
00783     if ( cl_showSend->integer ) {
00784         Com_Printf( "%i ", buf.cursize );
00785     }
00786 
00787     CL_Netchan_Transmit (&clc.netchan, &buf);   
00788 
00789     // clients never really should have messages large enough
00790     // to fragment, but in case they do, fire them all off
00791     // at once
00792     // TTimo: this causes a packet burst, which is bad karma for winsock
00793     // added a WARNING message, we'll see if there are legit situations where this happens
00794     while ( clc.netchan.unsentFragments ) {
00795         Com_DPrintf( "WARNING: #462 unsent fragments (not supposed to happen!)\n" );
00796         CL_Netchan_TransmitNextFragment( &clc.netchan );
00797     }
00798 }

Here is the call graph for this function:

void Con_Bottom void   ) 
 

Definition at line 772 of file cl_console.c.

References con, console_t::current, and console_t::display.

Referenced by Con_Clear_f(), and Console_Key().

00772                         {
00773     con.display = con.current;
00774 }

void Con_CheckResize void   ) 
 

Definition at line 248 of file cl_console.c.

References COLOR_WHITE, ColorIndex, Com_Memcpy(), con, Con_ClearNotify(), CON_TEXTSIZE, console_t::current, console_t::display, i, j, console_t::linewidth, SCREEN_WIDTH, console_t::text, console_t::totallines, and width.

Referenced by CL_ConsolePrint(), and Con_DrawConsole().

00249 {
00250     int     i, j, width, oldwidth, oldtotallines, numlines, numchars;
00251     MAC_STATIC short    tbuf[CON_TEXTSIZE];
00252 
00253     width = (SCREEN_WIDTH / SMALLCHAR_WIDTH) - 2;
00254 
00255     if (width == con.linewidth)
00256         return;
00257 
00258     if (width < 1)          // video hasn't been initialized yet
00259     {
00260         width = DEFAULT_CONSOLE_WIDTH;
00261         con.linewidth = width;
00262         con.totallines = CON_TEXTSIZE / con.linewidth;
00263         for(i=0; i<CON_TEXTSIZE; i++)
00264 
00265             con.text[i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
00266     }
00267     else
00268     {
00269         oldwidth = con.linewidth;
00270         con.linewidth = width;
00271         oldtotallines = con.totallines;
00272         con.totallines = CON_TEXTSIZE / con.linewidth;
00273         numlines = oldtotallines;
00274 
00275         if (con.totallines < numlines)
00276             numlines = con.totallines;
00277 
00278         numchars = oldwidth;
00279     
00280         if (con.linewidth < numchars)
00281             numchars = con.linewidth;
00282 
00283         Com_Memcpy (tbuf, con.text, CON_TEXTSIZE * sizeof(short));
00284         for(i=0; i<CON_TEXTSIZE; i++)
00285 
00286             con.text[i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
00287 
00288 
00289         for (i=0 ; i<numlines ; i++)
00290         {
00291             for (j=0 ; j<numchars ; j++)
00292             {
00293                 con.text[(con.totallines - 1 - i) * con.linewidth + j] =
00294                         tbuf[((con.current - i + oldtotallines) %
00295                               oldtotallines) * oldwidth + j];
00296             }
00297         }
00298 
00299         Con_ClearNotify ();
00300     }
00301 
00302     con.current = con.totallines - 1;
00303     con.display = con.current;
00304 }

Here is the call graph for this function:

void Con_Clear_f void   ) 
 

Definition at line 153 of file cl_console.c.

References COLOR_WHITE, ColorIndex, con, Con_Bottom(), i, and console_t::text.

Referenced by Con_Init().

00153                         {
00154     int     i;
00155 
00156     for ( i = 0 ; i < CON_TEXTSIZE ; i++ ) {
00157         con.text[i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
00158     }
00159 
00160     Con_Bottom();       // go to end
00161 }

Here is the call graph for this function:

void Con_ClearNotify void   ) 
 

Definition at line 231 of file cl_console.c.

References con, i, and console_t::times.

Referenced by CL_GetServerCommand(), CL_InitCGame(), Con_CheckResize(), Con_Close(), and Con_ToggleConsole_f().

00231                              {
00232     int     i;
00233     
00234     for ( i = 0 ; i < NUM_CON_TIMES ; i++ ) {
00235         con.times[i] = 0;
00236     }
00237 }

void Con_Close void   ) 
 

Definition at line 777 of file cl_console.c.

References cls, com_cl_running, con, Con_ClearNotify(), console_t::displayFrac, Field_Clear(), console_t::finalFrac, g_consoleField, cvar_s::integer, and clientStatic_t::keyCatchers.

Referenced by CIN_PlayCinematic(), CL_Connect_f(), CL_GetServerCommand(), CL_InitCGame(), CL_MapLoading(), CL_ParseGamestate(), and CL_PlayDemo_f().

00777                        {
00778     if ( !com_cl_running->integer ) {
00779         return;
00780     }
00781     Field_Clear( &g_consoleField );
00782     Con_ClearNotify ();
00783     cls.keyCatchers &= ~KEYCATCH_CONSOLE;
00784     con.finalFrac = 0;              // none visible
00785     con.displayFrac = 0;
00786 }

Here is the call graph for this function:

void Con_DrawCharacter int  cx,
int  line,
int  num
 

void Con_DrawConsole void   ) 
 

Definition at line 695 of file cl_console.c.

References cls, con, Con_CheckResize(), Con_DrawNotify(), Con_DrawSolidConsole(), console_t::displayFrac, KEYCATCH_UI, clientStatic_t::keyCatchers, and clientStatic_t::state.

Referenced by SCR_DrawScreenField().

00695                              {
00696     // check for console width changes from a vid mode change
00697     Con_CheckResize ();
00698 
00699     // if disconnected, render console full screen
00700     if ( cls.state == CA_DISCONNECTED ) {
00701         if ( !( cls.keyCatchers & (KEYCATCH_UI | KEYCATCH_CGAME)) ) {
00702             Con_DrawSolidConsole( 1.0 );
00703             return;
00704         }
00705     }
00706 
00707     if ( con.displayFrac ) {
00708         Con_DrawSolidConsole( con.displayFrac );
00709     } else {
00710         // draw notify lines
00711         if ( cls.state == CA_ACTIVE ) {
00712             Con_DrawNotify ();
00713         }
00714     }
00715 }

Here is the call graph for this function:

void Con_DrawNotify void   ) 
 

Definition at line 502 of file cl_console.c.

References BIGCHAR_WIDTH, chatField, cl, cl_conXOffset, cls, con, con_notifytime, console_t::current, f, Field_BigDraw(), g_color_table, i, cvar_s::integer, KEYCATCH_UI, clientStatic_t::keyCatchers, console_t::linewidth, NULL, NUM_CON_TIMES, PM_INTERMISSION, playerState_s::pm_type, clSnapshot_t::ps, qtrue, re, clientStatic_t::realtime, SCR_DrawBigString(), SCR_DrawSmallChar(), SCREEN_WIDTH, refexport_t::SetColor, SMALLCHAR_WIDTH, clientActive_t::snap, console_t::text, time(), console_t::times, console_t::totallines, v, cvar_s::value, x, and console_t::xadjust.

Referenced by Con_DrawConsole().

00503 {
00504     int     x, v;
00505     short   *text;
00506     int     i;
00507     int     time;
00508     int     skip;
00509     int     currentColor;
00510 
00511     currentColor = 7;
00512     re.SetColor( g_color_table[currentColor] );
00513 
00514     v = 0;
00515     for (i= con.current-NUM_CON_TIMES+1 ; i<=con.current ; i++)
00516     {
00517         if (i < 0)
00518             continue;
00519         time = con.times[i % NUM_CON_TIMES];
00520         if (time == 0)
00521             continue;
00522         time = cls.realtime - time;
00523         if (time > con_notifytime->value*1000)
00524             continue;
00525         text = con.text + (i % con.totallines)*con.linewidth;
00526 
00527         if (cl.snap.ps.pm_type != PM_INTERMISSION && cls.keyCatchers & (KEYCATCH_UI | KEYCATCH_CGAME) ) {
00528             continue;
00529         }
00530 
00531         for (x = 0 ; x < con.linewidth ; x++) {
00532             if ( ( text[x] & 0xff ) == ' ' ) {
00533                 continue;
00534             }
00535             if ( ( (text[x]>>8)&7 ) != currentColor ) {
00536                 currentColor = (text[x]>>8)&7;
00537                 re.SetColor( g_color_table[currentColor] );
00538             }
00539             SCR_DrawSmallChar( cl_conXOffset->integer + con.xadjust + (x+1)*SMALLCHAR_WIDTH, v, text[x] & 0xff );
00540         }
00541 
00542         v += SMALLCHAR_HEIGHT;
00543     }
00544 
00545     re.SetColor( NULL );
00546 
00547     if (cls.keyCatchers & (KEYCATCH_UI | KEYCATCH_CGAME) ) {
00548         return;
00549     }
00550 
00551     // draw the chat line
00552     if ( cls.keyCatchers & KEYCATCH_MESSAGE )
00553     {
00554         if (chat_team)
00555         {
00556             SCR_DrawBigString (8, v, "say_team:", 1.0f );
00557             skip = 11;
00558         }
00559         else
00560         {
00561             SCR_DrawBigString (8, v, "say:", 1.0f );
00562             skip = 5;
00563         }
00564 
00565         Field_BigDraw( &chatField, skip * BIGCHAR_WIDTH, v,
00566             SCREEN_WIDTH - ( skip + 1 ) * BIGCHAR_WIDTH, qtrue );
00567 
00568         v += BIGCHAR_HEIGHT;
00569     }
00570 
00571 }

Here is the call graph for this function:

void Con_Init void   ) 
 

Definition at line 312 of file cl_console.c.

References Cmd_AddCommand(), Con_Clear_f(), con_conspeed, Con_Dump_f(), Con_MessageMode2_f(), Con_MessageMode3_f(), Con_MessageMode4_f(), Con_MessageMode_f(), con_notifytime, Con_ToggleConsole_f(), Cvar_Get(), Field_Clear(), g_consoleField, historyEditLines, i, and field_t::widthInChars.

Referenced by CL_Init().

00312                      {
00313     int     i;
00314 
00315     con_notifytime = Cvar_Get ("con_notifytime", "3", 0);
00316     con_conspeed = Cvar_Get ("scr_conspeed", "3", 0);
00317 
00318     Field_Clear( &g_consoleField );
00319     g_consoleField.widthInChars = g_console_field_width;
00320     for ( i = 0 ; i < COMMAND_HISTORY ; i++ ) {
00321         Field_Clear( &historyEditLines[i] );
00322         historyEditLines[i].widthInChars = g_console_field_width;
00323     }
00324 
00325     Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f);
00326     Cmd_AddCommand ("messagemode", Con_MessageMode_f);
00327     Cmd_AddCommand ("messagemode2", Con_MessageMode2_f);
00328     Cmd_AddCommand ("messagemode3", Con_MessageMode3_f);
00329     Cmd_AddCommand ("messagemode4", Con_MessageMode4_f);
00330     Cmd_AddCommand ("clear", Con_Clear_f);
00331     Cmd_AddCommand ("condump", Con_Dump_f);
00332 }

Here is the call graph for this function:

void Con_PageDown void   ) 
 

Definition at line 758 of file cl_console.c.

References con, console_t::current, and console_t::display.

Referenced by Console_Key().

00758                           {
00759     con.display += 2;
00760     if (con.display > con.current) {
00761         con.display = con.current;
00762     }
00763 }

void Con_PageUp void   ) 
 

Definition at line 751 of file cl_console.c.

References con, console_t::current, console_t::display, and console_t::totallines.

Referenced by Console_Key().

00751                         {
00752     con.display -= 2;
00753     if ( con.current - con.display >= con.totallines ) {
00754         con.display = con.current - con.totallines + 1;
00755     }
00756 }

void Con_RunConsole void   ) 
 

Definition at line 726 of file cl_console.c.

References cls, con, con_conspeed, console_t::displayFrac, console_t::finalFrac, clientStatic_t::keyCatchers, clientStatic_t::realFrametime, and cvar_s::value.

Referenced by CL_Frame().

00726                            {
00727     // decide on the destination height of the console
00728     if ( cls.keyCatchers & KEYCATCH_CONSOLE )
00729         con.finalFrac = 0.5;        // half screen
00730     else
00731         con.finalFrac = 0;              // none visible
00732     
00733     // scroll towards the destination height
00734     if (con.finalFrac < con.displayFrac)
00735     {
00736         con.displayFrac -= con_conspeed->value*cls.realFrametime*0.001;
00737         if (con.finalFrac > con.displayFrac)
00738             con.displayFrac = con.finalFrac;
00739 
00740     }
00741     else if (con.finalFrac > con.displayFrac)
00742     {
00743         con.displayFrac += con_conspeed->value*cls.realFrametime*0.001;
00744         if (con.finalFrac < con.displayFrac)
00745             con.displayFrac = con.finalFrac;
00746     }
00747 
00748 }

void Con_ToggleConsole_f void   ) 
 

Definition at line 73 of file cl_console.c.

References CA_DISCONNECTED, CL_StartDemoLoop(), cls, Con_ClearNotify(), Field_Clear(), g_consoleField, clientStatic_t::keyCatchers, clientStatic_t::state, and field_t::widthInChars.

Referenced by CL_KeyEvent(), and Con_Init().

00073                                 {
00074     // closing a full screen console restarts the demo loop
00075     if ( cls.state == CA_DISCONNECTED && cls.keyCatchers == KEYCATCH_CONSOLE ) {
00076         CL_StartDemoLoop();
00077         return;
00078     }
00079 
00080     Field_Clear( &g_consoleField );
00081     g_consoleField.widthInChars = g_console_field_width;
00082 
00083     Con_ClearNotify ();
00084     cls.keyCatchers ^= KEYCATCH_CONSOLE;
00085 }

Here is the call graph for this function:

void Con_Top void   ) 
 

Definition at line 765 of file cl_console.c.

References con, console_t::current, console_t::display, and console_t::totallines.

Referenced by Console_Key().

00765                      {
00766     con.display = con.totallines;
00767     if ( con.current - con.display >= con.totallines ) {
00768         con.display = con.current - con.totallines + 1;
00769     }
00770 }

void IN_CenterView void   ) 
 

Definition at line 257 of file cl_input.c.

References cl, playerState_s::delta_angles, PITCH, clSnapshot_t::ps, SHORT2ANGLE, clientActive_t::snap, and clientActive_t::viewangles.

Referenced by CL_InitInput(), and IN_MLookUp().

00257                           {
00258     cl.viewangles[PITCH] = -SHORT2ANGLE(cl.snap.ps.delta_angles[PITCH]);
00259 }

int Key_GetCatcher void   ) 
 

Definition at line 670 of file cl_ui.c.

References cls, and clientStatic_t::keyCatchers.

Referenced by CL_CgameSystemCalls(), and CL_UISystemCalls().

00670                            {
00671     return cls.keyCatchers;
00672 }

char* Key_KeynumToString int  keynum  ) 
 

Definition at line 739 of file cl_keys.c.

References i, j, keyname_t::keynum, and keyname_t::name.

Referenced by CL_KeyEvent(), Key_Bindlist_f(), Key_KeynumToStringBuf(), and Key_WriteBindings().

00739                                        {
00740     keyname_t   *kn;    
00741     static  char    tinystr[5];
00742     int         i, j;
00743 
00744     if ( keynum == -1 ) {
00745         return "<KEY NOT FOUND>";
00746     }
00747 
00748     if ( keynum < 0 || keynum > 255 ) {
00749         return "<OUT OF RANGE>";
00750     }
00751 
00752     // check for printable ascii (don't use quote)
00753     if ( keynum > 32 && keynum < 127 && keynum != '"' && keynum != ';' ) {
00754         tinystr[0] = keynum;
00755         tinystr[1] = 0;
00756         return tinystr;
00757     }
00758 
00759     // check for a key string
00760     for ( kn=keynames ; kn->name ; kn++ ) {
00761         if (keynum == kn->keynum) {
00762             return kn->name;
00763         }
00764     }
00765 
00766     // make a hex string
00767     i = keynum >> 4;
00768     j = keynum & 15;
00769 
00770     tinystr[0] = '0';
00771     tinystr[1] = 'x';
00772     tinystr[2] = i > 9 ? i - 10 + 'a' : i + '0';
00773     tinystr[3] = j > 9 ? j - 10 + 'a' : j + '0';
00774     tinystr[4] = 0;
00775 
00776     return tinystr;
00777 }

void Key_SetCatcher int  catcher  ) 
 

Definition at line 679 of file cl_ui.c.

References cls, and clientStatic_t::keyCatchers.

Referenced by CL_CgameSystemCalls(), and CL_UISystemCalls().

00679                                    {
00680     cls.keyCatchers = catcher;
00681 }

void LAN_LoadCachedServers  ) 
 

Definition at line 50 of file cl_ui.c.

References cls, clientStatic_t::favoriteServers, fileHandle_t, FS_FCloseFile(), FS_Read(), FS_SV_FOpenFileRead(), clientStatic_t::globalServers, clientStatic_t::mplayerServers, clientStatic_t::numfavoriteservers, clientStatic_t::numGlobalServerAddresses, clientStatic_t::numglobalservers, and clientStatic_t::nummplayerservers.

Referenced by CL_UISystemCalls().

00050                               {
00051     int size;
00052     fileHandle_t fileIn;
00053     cls.numglobalservers = cls.nummplayerservers = cls.numfavoriteservers = 0;
00054     cls.numGlobalServerAddresses = 0;
00055     if (FS_SV_FOpenFileRead("servercache.dat", &fileIn)) {
00056         FS_Read(&cls.numglobalservers, sizeof(int), fileIn);
00057         FS_Read(&cls.nummplayerservers, sizeof(int), fileIn);
00058         FS_Read(&cls.numfavoriteservers, sizeof(int), fileIn);
00059         FS_Read(&size, sizeof(int), fileIn);
00060         if (size == sizeof(cls.globalServers) + sizeof(cls.favoriteServers) + sizeof(cls.mplayerServers)) {
00061             FS_Read(&cls.globalServers, sizeof(cls.globalServers), fileIn);
00062             FS_Read(&cls.mplayerServers, sizeof(cls.mplayerServers), fileIn);
00063             FS_Read(&cls.favoriteServers, sizeof(cls.favoriteServers), fileIn);
00064         } else {
00065             cls.numglobalservers = cls.nummplayerservers = cls.numfavoriteservers = 0;
00066             cls.numGlobalServerAddresses = 0;
00067         }
00068         FS_FCloseFile(fileIn);
00069     }
00070 }

Here is the call graph for this function:

void LAN_SaveServersToCache  ) 
 

Definition at line 77 of file cl_ui.c.

References cls, clientStatic_t::favoriteServers, fileHandle_t, FS_FCloseFile(), FS_SV_FOpenFileWrite(), FS_Write(), clientStatic_t::globalServers, clientStatic_t::mplayerServers, clientStatic_t::numfavoriteservers, clientStatic_t::numglobalservers, and clientStatic_t::nummplayerservers.

Referenced by CL_UISystemCalls().

00077                                {
00078     int size;
00079     fileHandle_t fileOut = FS_SV_FOpenFileWrite("servercache.dat");
00080     FS_Write(&cls.numglobalservers, sizeof(int), fileOut);
00081     FS_Write(&cls.nummplayerservers, sizeof(int), fileOut);
00082     FS_Write(&cls.numfavoriteservers, sizeof(int), fileOut);
00083     size = sizeof(cls.globalServers) + sizeof(cls.favoriteServers) + sizeof(cls.mplayerServers);
00084     FS_Write(&size, sizeof(int), fileOut);
00085     FS_Write(&cls.globalServers, sizeof(cls.globalServers), fileOut);
00086     FS_Write(&cls.mplayerServers, sizeof(cls.mplayerServers), fileOut);
00087     FS_Write(&cls.favoriteServers, sizeof(cls.favoriteServers), fileOut);
00088     FS_FCloseFile(fileOut);
00089 }

Here is the call graph for this function:

void SCR_AdjustFrom640 float *  x,
float *  y,
float *  w,
float *  h
 

Definition at line 59 of file cl_scrn.c.

References cls, clientStatic_t::glconfig, h(), glconfig_t::vidHeight, glconfig_t::vidWidth, w, x, and y.

Referenced by CIN_DrawCinematic(), Con_DrawSolidConsole(), SCR_DrawChar(), SCR_DrawNamedPic(), SCR_DrawPic(), and SCR_FillRect().

00059                                                                  {
00060     float   xscale;
00061     float   yscale;
00062 
00063 #if 0
00064         // adjust for wide screens
00065         if ( cls.glconfig.vidWidth * 480 > cls.glconfig.vidHeight * 640 ) {
00066             *x += 0.5 * ( cls.glconfig.vidWidth - ( cls.glconfig.vidHeight * 640 / 480 ) );
00067         }
00068 #endif
00069 
00070     // scale for screen sizes
00071     xscale = cls.glconfig.vidWidth / 640.0;
00072     yscale = cls.glconfig.vidHeight / 480.0;
00073     if ( x ) {
00074         *x *= xscale;
00075     }
00076     if ( y ) {
00077         *y *= yscale;
00078     }
00079     if ( w ) {
00080         *w *= xscale;
00081     }
00082     if ( h ) {
00083         *h *= yscale;
00084     }
00085 }

Here is the call graph for this function:

void SCR_DebugGraph float  value,
int  color
 

Definition at line 368 of file cl_scrn.c.

00369 {
00370     values[current&1023].value = value;
00371     values[current&1023].color = color;
00372     current++;
00373 }

void SCR_DrawBigString int  x,
int  y,
const char *  s,
float  alpha
 

Definition at line 243 of file cl_scrn.c.

References BIGCHAR_WIDTH, qfalse, s, SCR_DrawStringExt(), x, and y.

Referenced by Con_DrawNotify(), and Field_VariableSizeDraw().

00243                                                                    {
00244     float   color[4];
00245 
00246     color[0] = color[1] = color[2] = 1.0;
00247     color[3] = alpha;
00248     SCR_DrawStringExt( x, y, BIGCHAR_WIDTH, s, color, qfalse );
00249 }

Here is the call graph for this function:

void SCR_DrawBigStringColor int  x,
int  y,
const char *  s,
vec4_t  color
 

Definition at line 251 of file cl_scrn.c.

References BIGCHAR_WIDTH, qtrue, s, SCR_DrawStringExt(), x, and y.

00251                                                                          {
00252     SCR_DrawStringExt( x, y, BIGCHAR_WIDTH, s, color, qtrue );
00253 }

Here is the call graph for this function:

void SCR_DrawCinematic void   ) 
 

Definition at line 1697 of file cl_cin.c.

References CIN_DrawCinematic(), and CL_handle.

Referenced by SCR_DrawScreenField().

01697                               {
01698     if (CL_handle >= 0 && CL_handle < MAX_VIDEO_HANDLES) {
01699         CIN_DrawCinematic(CL_handle);
01700     }
01701 }

Here is the call graph for this function:

void SCR_DrawNamedPic float  x,
float  y,
float  width,
float  height,
const char *  picname
 

Definition at line 41 of file cl_scrn.c.

References assert, refexport_t::DrawStretchPic, height, qhandle_t, re, refexport_t::RegisterShader, SCR_AdjustFrom640(), width, x, and y.

00041                                                                                           {
00042     qhandle_t   hShader;
00043 
00044     assert( width != 0 );
00045 
00046     hShader = re.RegisterShader( picname );
00047     SCR_AdjustFrom640( &x, &y, &width, &height );
00048     re.DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
00049 }

Here is the call graph for this function:

void SCR_DrawPic float  x,
float  y,
float  width,
float  height,
qhandle_t  hShader
 

Definition at line 111 of file cl_scrn.c.

References refexport_t::DrawStretchPic, height, re, SCR_AdjustFrom640(), width, x, and y.

Referenced by Con_DrawSolidConsole().

00111                                                                                    {
00112     SCR_AdjustFrom640( &x, &y, &width, &height );
00113     re.DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
00114 }

Here is the call graph for this function:

void SCR_DrawSmallChar int  x,
int  y,
int  ch
 

Definition at line 160 of file cl_scrn.c.

References ch, clientStatic_t::charSetShader, cls, col, refexport_t::DrawStretchPic, re, SMALLCHAR_HEIGHT, SMALLCHAR_WIDTH, x, and y.

Referenced by Con_DrawInput(), Con_DrawNotify(), Con_DrawSolidConsole(), Field_VariableSizeDraw(), and SCR_DrawSmallStringExt().

00160                                                {
00161     int row, col;
00162     float frow, fcol;
00163     float size;
00164 
00165     ch &= 255;
00166 
00167     if ( ch == ' ' ) {
00168         return;
00169     }
00170 
00171     if ( y < -SMALLCHAR_HEIGHT ) {
00172         return;
00173     }
00174 
00175     row = ch>>4;
00176     col = ch&15;
00177 
00178     frow = row*0.0625;
00179     fcol = col*0.0625;
00180     size = 0.0625;
00181 
00182     re.DrawStretchPic( x, y, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT,
00183                        fcol, frow, 
00184                        fcol + size, frow + size, 
00185                        cls.charSetShader );
00186 }

void SCR_DrawSmallStringExt int  x,
int  y,
const char *  string,
float *  setColor,
qboolean  forceColor
 

Definition at line 266 of file cl_scrn.c.

References ColorIndex, Com_Memcpy(), g_color_table, NULL, Q_IsColorString, re, s, SCR_DrawSmallChar(), refexport_t::SetColor, xx, and y.

Referenced by Field_VariableSizeDraw().

00266                                                                                                       {
00267     vec4_t      color;
00268     const char  *s;
00269     int         xx;
00270 
00271     // draw the colored text
00272     s = string;
00273     xx = x;
00274     re.SetColor( setColor );
00275     while ( *s ) {
00276         if ( Q_IsColorString( s ) ) {
00277             if ( !forceColor ) {
00278                 Com_Memcpy( color, g_color_table[ColorIndex(*(s+1))], sizeof( color ) );
00279                 color[3] = setColor[3];
00280                 re.SetColor( color );
00281             }
00282             s += 2;
00283             continue;
00284         }
00285         SCR_DrawSmallChar( xx, y, *s );
00286         xx += SMALLCHAR_WIDTH;
00287         s++;
00288     }
00289     re.SetColor( NULL );
00290 }

Here is the call graph for this function:

void SCR_FillRect float  x,
float  y,
float  width,
float  height,
const float *  color
 

Definition at line 94 of file cl_scrn.c.

References cls, refexport_t::DrawStretchPic, height, NULL, re, SCR_AdjustFrom640(), refexport_t::SetColor, clientStatic_t::whiteShader, width, x, and y.

Referenced by Con_DrawSolidConsole().

00094                                                                                      {
00095     re.SetColor( color );
00096 
00097     SCR_AdjustFrom640( &x, &y, &width, &height );
00098     re.DrawStretchPic( x, y, width, height, 0, 0, 0, 0, cls.whiteShader );
00099 
00100     re.SetColor( NULL );
00101 }

Here is the call graph for this function:

int SCR_GetBigStringWidth const char *  str  ) 
 

Definition at line 316 of file cl_scrn.c.

References SCR_Strlen().

00316                                              {
00317     return SCR_Strlen( str ) * 16;
00318 }

Here is the call graph for this function:

void SCR_Init void   ) 
 

Definition at line 418 of file cl_scrn.c.

References cl_debuggraph, cl_graphheight, cl_graphscale, cl_graphshift, cl_timegraph, CVAR_CHEAT, Cvar_Get(), and scr_initialized.

Referenced by CL_Init().

00418                       {
00419     cl_timegraph = Cvar_Get ("timegraph", "0", CVAR_CHEAT);
00420     cl_debuggraph = Cvar_Get ("debuggraph", "0", CVAR_CHEAT);
00421     cl_graphheight = Cvar_Get ("graphheight", "32", CVAR_CHEAT);
00422     cl_graphscale = Cvar_Get ("graphscale", "1", CVAR_CHEAT);
00423     cl_graphshift = Cvar_Get ("graphshift", "0", CVAR_CHEAT);
00424 
00425     scr_initialized = qtrue;
00426 }

Here is the call graph for this function:

void SCR_RunCinematic void   ) 
 

Definition at line 1703 of file cl_cin.c.

References CIN_RunCinematic(), and CL_handle.

Referenced by CL_Frame(), and CL_PlayCinematic_f().

01704 {
01705     if (CL_handle >= 0 && CL_handle < MAX_VIDEO_HANDLES) {
01706         CIN_RunCinematic(CL_handle);
01707     }
01708 }

Here is the call graph for this function:

void SCR_StopCinematic void   ) 
 

Definition at line 1710 of file cl_cin.c.

References CIN_StopCinematic(), CL_handle, and S_StopAllSounds().

Referenced by CL_Disconnect(), CL_Disconnect_f(), and CL_PlayCinematic_f().

01710                              {
01711     if (CL_handle >= 0 && CL_handle < MAX_VIDEO_HANDLES) {
01712         CIN_StopCinematic(CL_handle);
01713         S_StopAllSounds ();
01714         CL_handle = -1;
01715     }
01716 }

Here is the call graph for this function:

void SCR_UpdateScreen void   ) 
 

Definition at line 519 of file cl_scrn.c.

References cls, Com_Error(), com_speeds, refexport_t::EndFrame, ERR_FATAL, clientStatic_t::glconfig, cvar_s::integer, NULL, re, SCR_DrawScreenField(), STEREO_CENTER, STEREO_LEFT, STEREO_RIGHT, glconfig_t::stereoEnabled, time_backend, and time_frontend.

Referenced by CL_CgameSystemCalls(), CL_Frame(), CL_MapLoading(), CL_UISystemCalls(), and Console_Key().

00519                               {
00520     static int  recursive;
00521 
00522     if ( !scr_initialized ) {
00523         return;             // not initialized yet
00524     }
00525 
00526     if ( ++recursive > 2 ) {
00527         Com_Error( ERR_FATAL, "SCR_UpdateScreen: recursively called" );
00528     }
00529     recursive = 1;
00530 
00531     // if running in stereo, we need to draw the frame twice
00532     if ( cls.glconfig.stereoEnabled ) {
00533         SCR_DrawScreenField( STEREO_LEFT );
00534         SCR_DrawScreenField( STEREO_RIGHT );
00535     } else {
00536         SCR_DrawScreenField( STEREO_CENTER );
00537     }
00538 
00539     if ( com_speeds->integer ) {
00540         re.EndFrame( &time_frontend, &time_backend );
00541     } else {
00542         re.EndFrame( NULL, NULL );
00543     }
00544 
00545     recursive = 0;
00546 }

Here is the call graph for this function:


Variable Documentation

vm_t* cgvm
 

Definition at line 75 of file cl_main.c.

Referenced by CL_CGameRendering(), CL_GameCommand(), CL_InitCGame(), CL_KeyEvent(), CL_MouseEvent(), CL_ShutdownCGame(), Con_MessageMode3_f(), and Con_MessageMode4_f().

clientActive_t cl
 

Definition at line 72 of file cl_main.c.

Referenced by CalculateRanks(), CG_EntityEffects(), CheckExitRules(), CheckIntermissionExit(), CL_AdjustAngles(), CL_AdjustTimeDelta(), CL_CGameRendering(), CL_CheckTimeout(), CL_ClearState(), CL_ConfigstringModified(), CL_Configstrings_f(), CL_CreateCmd(), CL_CreateNewCommands(), CL_DeltaEntity(), CL_FinishMove(), CL_FirstSnapshot(), CL_GetCurrentCmdNumber(), CL_GetCurrentSnapshotNumber(), CL_GetGameState(), CL_GetParseEntityState(), CL_GetServerCommand(), CL_GetSnapshot(), CL_GetUserCmd(), CL_InitCGame(), CL_JoystickEvent(), CL_JoystickMove(), CL_MapLoading(), CL_MouseEvent(), CL_MouseMove(), CL_ParseGamestate(), CL_ParsePacketEntities(), CL_ParseSnapshot(), CL_ReadyToSendPacket(), CL_Record_f(), CL_SendPureChecksums(), CL_SetCGameTime(), CL_SetUserCmdValue(), CL_SystemInfoChanged(), CL_WritePacket(), ClientForString(), ClientNumberFromString(), Com_Frame(), Con_DrawNotify(), DeathmatchScoreboardMessage(), ExitLevel(), FloodEntities(), G_AddRandomBot(), G_CountBotPlayers(), G_CountHumanPlayers(), G_RemoveRandomBot(), GetClientState(), GetConfigString(), IN_CenterView(), LogExit(), Pickup_Team(), s714(), scon(), SpectatorClientEndFrame(), SV_Ban_f(), SV_BanNum_f(), SV_BeginDownload_f(), SV_BotAllocateClient(), SV_BotFreeClient(), SV_BotGetConsoleMessage(), SV_BotGetSnapshotEntity(), SV_CalcPings(), SV_CheckPaused(), SV_CheckTimeouts(), SV_ClientCommand(), SV_ClientThink(), SV_CloseDownload(), SV_DirectConnect(), SV_Disconnect_f(), SV_DoneDownload_f(), SV_DumpUser_f(), SV_ExecuteClientCommand(), SV_ExecuteClientMessage(), SV_FinalMessage(), SV_GetPlayerByName(), SV_GetPlayerByNum(), SV_Kick_f(), SV_KickNum_f(), SV_NextDownload_f(), SV_PacketEvent(), SV_ResetPureClient_f(), SV_SendServerCommand(), SV_Status_f(), SV_StopDownload_f(), SV_UpdateUserinfo_f(), SV_UserinfoChanged(), SV_UserMove(), SV_VerifyPaks_f(), SV_WriteDownloadToClient(), SVC_Status(), Svcmd_ForceTeam_f(), Team_TouchEnemyFlag(), Team_TouchOurFlag(), typestab(), VL_LightmapMatrixFromPoints(), and VS_LightmapMatrixFromPoints().

cvar_t* cl_activeAction
 

Definition at line 61 of file cl_main.c.

Referenced by CL_FirstSnapshot(), and CL_Init().

cvar_t* cl_allowDownload
 

Definition at line 65 of file cl_main.c.

Referenced by CL_Init(), and CL_InitDownloads().

cvar_t* cl_anglespeedkey
 

Definition at line 273 of file cl_input.c.

Referenced by CL_AdjustAngles(), CL_Init(), and CL_JoystickMove().

int cl_connectedToPureServer
 

Definition at line 316 of file cl_parse.c.

Referenced by CL_Disconnect(), CL_InitCGame(), CL_InitUI(), and CL_SystemInfoChanged().

cvar_t* cl_conXOffset
 

Definition at line 66 of file cl_main.c.

Referenced by CL_Init(), and Con_DrawNotify().

cvar_t* cl_debugMove
 

Definition at line 28 of file cl_main.c.

Referenced by CL_CreateCmd(), CL_InitInput(), and SCR_DrawScreenField().

cvar_t* cl_freelook
 

Definition at line 49 of file cl_main.c.

Referenced by CL_Init(), CL_MouseMove(), and IN_MLookUp().

cvar_t* cl_freezeDemo
 

Definition at line 41 of file cl_main.c.

Referenced by CL_Init(), and CL_SetCGameTime().

cvar_t* cl_inGameVideo
 

Definition at line 67 of file cl_main.c.

Referenced by CIN_PlayCinematic(), CIN_UploadCinematic(), and CL_Init().

cvar_t* cl_maxpackets
 

Definition at line 37 of file cl_main.c.

Referenced by CL_Init(), and CL_ReadyToSendPacket().

cvar_t* cl_mouseAccel
 

Definition at line 52 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* cl_nodelta
 

Definition at line 27 of file cl_main.c.

Referenced by CL_InitInput(), and CL_WritePacket().

cvar_t* cl_noprint
 

Definition at line 30 of file cl_main.c.

Referenced by CL_ConsolePrint(), and CL_Init().

cvar_t* cl_packetdup
 

Definition at line 38 of file cl_main.c.

Referenced by CL_Init(), and CL_WritePacket().

cvar_t* cl_pitchspeed
 

Definition at line 269 of file cl_input.c.

Referenced by CL_AdjustAngles(), CL_Init(), and CL_JoystickMove().

cvar_t* cl_run
 

Definition at line 271 of file cl_input.c.

Referenced by CL_Init(), CL_JoystickMove(), and CL_KeyMove().

cvar_t* cl_sensitivity
 

Definition at line 50 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* cl_showMouseRate
 

Definition at line 53 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* cl_shownet
 

Definition at line 43 of file cl_main.c.

cvar_t* cl_showSend
 

Definition at line 44 of file cl_main.c.

Referenced by CL_Init(), CL_SendCmd(), and CL_WritePacket().

cvar_t* cl_showTimeDelta
 

Definition at line 40 of file cl_main.c.

Referenced by CL_AdjustTimeDelta(), and CL_Init().

cvar_t* cl_timedemo
 

Definition at line 45 of file cl_main.c.

Referenced by CL_DemoCompleted(), CL_Init(), and CL_SetCGameTime().

cvar_t* cl_timegraph
 

Definition at line 28 of file cl_scrn.c.

Referenced by CL_Frame(), SCR_DrawScreenField(), and SCR_Init().

cvar_t* cl_timeNudge
 

Definition at line 39 of file cl_main.c.

Referenced by CL_Init(), and CL_SetCGameTime().

cvar_t* cl_yawspeed
 

Definition at line 268 of file cl_input.c.

Referenced by CL_AdjustAngles(), CL_Init(), and CL_JoystickMove().

clientConnection_t clc
 

Definition at line 73 of file cl_main.c.

Referenced by CL_AddReliableCommand(), CL_AdjustTimeDelta(), CL_BeginDownload(), CL_CGameRendering(), CL_ChangeReliableCommand(), CL_CheckForResend(), CL_CheckTimeout(), CL_Connect_f(), CL_ConnectionlessPacket(), CL_DemoCompleted(), CL_Disconnect(), CL_DisconnectPacket(), CL_DownloadsComplete(), CL_FirstSnapshot(), CL_ForwardCommandToServer(), CL_ForwardToServer_f(), CL_GetServerCommand(), CL_InitCGame(), CL_InitDownloads(), CL_KeyEvent(), CL_MapLoading(), CL_Netchan_Decode(), CL_Netchan_Encode(), CL_NextDownload(), CL_PacketEvent(), CL_ParseCommandString(), CL_ParseDownload(), CL_ParseGamestate(), CL_ParseServerMessage(), CL_ParseSnapshot(), CL_PlayDemo_f(), CL_Rcon_f(), CL_ReadDemoMessage(), CL_ReadyToSendPacket(), CL_Record_f(), CL_ServerStatus_f(), CL_SetCGameTime(), CL_StopRecord_f(), CL_SystemInfoChanged(), CL_Vid_Restart_f(), CL_WriteDemoMessage(), CL_WritePacket(), GetClientState(), and SCR_DrawDemoRecording().

clientStatic_t cls
 

Definition at line 74 of file cl_main.c.

int g_console_field_width
 

Definition at line 27 of file cl_console.c.

Referenced by CL_InitRenderer().

kbutton_t in_klook
 

kbutton_t in_mlook
 

kbutton_t in_speed
 

Definition at line 52 of file cl_input.c.

Referenced by CL_AdjustAngles(), CL_JoystickMove(), CL_KeyMove(), IN_SpeedDown(), and IN_SpeedUp().

kbutton_t in_strafe
 

Definition at line 52 of file cl_input.c.

Referenced by CL_AdjustAngles(), CL_JoystickMove(), CL_KeyMove(), CL_MouseMove(), IN_StrafeDown(), and IN_StrafeUp().

cvar_t* m_filter
 

Definition at line 59 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* m_forward
 

Definition at line 57 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* m_pitch
 

Definition at line 55 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* m_side
 

Definition at line 58 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

cvar_t* m_yaw
 

Definition at line 56 of file cl_main.c.

Referenced by CL_Init(), and CL_MouseMove().

refexport_t re
 

Definition at line 78 of file cl_main.c.

vm_t* uivm
 

Definition at line 29 of file cl_ui.c.

Referenced by CIN_PlayCinematic(), CL_CharEvent(), CL_Disconnect(), CL_Frame(), CL_InitUI(), CL_KeyEvent(), CL_MouseEvent(), CL_ShutdownUI(), SCR_DrawScreenField(), UI_GameCommand(), and UI_usesUniqueCDKey().


Generated on Thu Aug 25 13:38:54 2005 for Quake III Arena by  doxygen 1.3.9.1