63 "OBSOLETE svc_spawnbinary",
72 "svc_spawnstaticsound",
94 "svc_updatestatubyte",
102 "svc_spawnstaticsound2",
103 "svc_trailparticles",
104 "svc_pointparticles",
105 "svc_pointparticles1",
124 "qw_svc_updatefrags",
130 "qw_svc_spawnstatic",
132 "qw_svc_spawnbaseline",
133 "qw_svc_temp_entity",
136 "qw_svc_centerprint",
137 "qw_svc_killedmonster",
138 "qw_svc_foundsecret",
139 "qw_svc_spawnstaticsound",
140 "qw_svc_intermission",
147 "qw_svc_updateentertime",
148 "qw_svc_updatestatlong",
149 "qw_svc_muzzleflash",
150 "qw_svc_updateuserinfo",
157 "qw_svc_packetentities",
158 "qw_svc_deltapacketentities",
174cvar_t cl_gameplayfix_soundsmovewithentities = {
CF_CLIENT,
"cl_gameplayfix_soundsmovewithentities",
"1",
"causes sounds made by lifts, players, projectiles, and any other entities, to move with the entity, so for example a rocket noise follows the rocket rather than staying at the starting position"};
177cvar_t cl_sound_tink1 = {
CF_CLIENT,
"cl_sound_tink1",
"weapons/tink1.wav",
"sound to play with 80% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"};
178cvar_t cl_sound_ric1 = {
CF_CLIENT,
"cl_sound_ric1",
"weapons/ric1.wav",
"sound to play with 5% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"};
179cvar_t cl_sound_ric2 = {
CF_CLIENT,
"cl_sound_ric2",
"weapons/ric2.wav",
"sound to play with 5% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"};
180cvar_t cl_sound_ric3 = {
CF_CLIENT,
"cl_sound_ric3",
"weapons/ric3.wav",
"sound to play with 10% chance during TE_SPIKE/TE_SUPERSPIKE (empty cvar disables sound)"};
181cvar_t cl_readpicture_force = {
CF_CLIENT,
"cl_readpicture_force",
"0",
"when enabled, the low quality pictures read by ReadPicture() are preferred over the high quality pictures on the file system"};
184#define RIC_GUNSHOTQUAD 2
185cvar_t cl_sound_ric_gunshot = {
CF_CLIENT,
"cl_sound_ric_gunshot",
"0",
"specifies if and when the related cl_sound_ric and cl_sound_tink sounds apply to TE_GUNSHOT/TE_GUNSHOTQUAD, 0 = no sound, 1 = TE_GUNSHOT, 2 = TE_GUNSHOTQUAD, 3 = TE_GUNSHOT and TE_GUNSHOTQUAD"};
186cvar_t cl_sound_r_exp3 = {
CF_CLIENT,
"cl_sound_r_exp3",
"weapons/r_exp3.wav",
"sound to play during TE_EXPLOSION and related effects (empty cvar disables sound)"};
192cvar_t cl_nettimesyncboundmode = {
CF_CLIENT |
CF_ARCHIVE,
"cl_nettimesyncboundmode",
"6",
"method of restricting client time to valid values, 0 = no correction, 1 = tight bounding (jerky with packet loss), 2 = loose bounding (corrects it if out of bounds), 3 = leniant bounding (ignores temporary errors due to varying framerate), 4 = slow adjustment method from Quake3, 5 = slightly nicer version of Quake3 method, 6 = tight bounding + mode 5, 7 = jitter compensated dynamic adjustment rate"};
193cvar_t cl_nettimesyncboundtolerance = {
CF_CLIENT |
CF_ARCHIVE,
"cl_nettimesyncboundtolerance",
"0.25",
"how much error is tolerated by bounding check, as a fraction of frametime, 0.25 = up to 25% margin of error tolerated, 1 = use only new time, 0 = use only old time (same effect as setting cl_nettimesyncfactor to 1) (only affects bound modes 2 and 3)"};
194cvar_t cl_iplog_name = {
CF_CLIENT |
CF_ARCHIVE,
"cl_iplog_name",
"darkplaces_iplog.txt",
"name of iplog file containing player addresses for iplog_list command and automatic ip logging when parsing status command"};
229 if (channel & (1<<15))
234 if (channel & (1<<14))
241 ent = (channel>>3)&1023;
287 Con_Printf(
"CL_ParseStartSoundPacket: sound_num (%i) >= MAX_SOUNDS (%i)\n", sound_num,
MAX_SOUNDS);
293 Con_Printf(
"CL_ParseStartSoundPacket: ent = %i", ent);
300 if( !
CL_VM_Event_Sound(sound_num, nvolume / 255.0f, channel, attenuation, ent, pos, fflags, speed) )
316 static double lastdirtytime = 0;
317 static qbool recursive =
false;
320 static double countdownmsg = 0;
321 static double countdownupdate = 0;
326 thisrecursive = recursive;
330 deltatime = dirtytime - lastdirtytime;
331 lastdirtytime = dirtytime;
332 if (deltatime <= 0 || deltatime >= 1800.0)
335 countdownmsg -= deltatime;
336 countdownupdate -= deltatime;
342 if(countdownupdate <= 0)
350 recursive = thisrecursive;
369 unsigned char buf[4];
373 Con_Print(
"--> client to server keepalive\n");
374 memset(&msg, 0,
sizeof(msg));
381 recursive = thisrecursive;
386 qbool loadedsky =
false;
409 while (key[
strlen(key)-1] ==
' ')
414 if (!strcmp(
"sky", key))
419 else if (!strcmp(
"skyname", key))
424 else if (!strcmp(
"qlsky", key))
429 else if (!strcmp(
"fog", key))
438#define sscanf sscanf_s
440 sscanf(
value,
"%f %f %f %f %f %f %f %f %f", &
r_refdef.
fog_density, &
r_refdef.
fog_red, &
r_refdef.
fog_green, &
r_refdef.
fog_blue, &
r_refdef.
fog_alpha, &
r_refdef.
fog_start, &
r_refdef.
fog_end, &
r_refdef.
fog_height, &
r_refdef.
fog_fadedepth);
442 else if (!strcmp(
"fog_density", key))
444 else if (!strcmp(
"fog_red", key))
446 else if (!strcmp(
"fog_green", key))
448 else if (!strcmp(
"fog_blue", key))
450 else if (!strcmp(
"fog_alpha", key))
452 else if (!strcmp(
"fog_start", key))
454 else if (!strcmp(
"fog_end", key))
456 else if (!strcmp(
"fog_height", key))
458 else if (!strcmp(
"fog_fadedepth", key))
460 else if (!strcmp(
"fog_heighttexture", key))
464 sscanf_s(
value,
"%f %f %f %f %f %f %f %f %f %s", &
r_refdef.
fog_density, &
r_refdef.
fog_red, &
r_refdef.
fog_green, &
r_refdef.
fog_blue, &
r_refdef.
fog_alpha, &
r_refdef.
fog_start, &
r_refdef.
fog_end, &
r_refdef.
fog_height, &
r_refdef.
fog_fadedepth,
r_refdef.
fog_height_texturename, (
unsigned int)
sizeof(
r_refdef.
fog_height_texturename));
466 sscanf(
value,
"%f %f %f %f %f %f %f %f %f %63s", &
r_refdef.
fog_density, &
r_refdef.
fog_red, &
r_refdef.
fog_green, &
r_refdef.
fog_blue, &
r_refdef.
fog_alpha, &
r_refdef.
fog_start, &
r_refdef.
fog_end, &
r_refdef.
fog_height, &
r_refdef.
fog_fadedepth,
r_refdef.
fog_height_texturename);
556 Con_Printf(
"Unable to download \"%s\" when recording.\n", filename);
838 Host_Error(
"Server sent too many model precaches");
873 Host_Error(
"Server sent too many sound precaches");
914 int r, percent,
size;
962qbool QW_CL_IsUploading(
void)
979 int topcolor, bottomcolor;
1000 Con_Printf(
"svc_updateuserinfo >= cl.maxclients\n");
1021 Con_Printf(
"svc_setinfo >= cl.maxclients\n");
1047 unsigned char bits[6];
1048 for (
i = 0;
i < numnails;
i++)
1050 for (j = 0;j < 6;j++)
1055 v[0] = ( ( bits[0] + ((bits[1]&15)<<8) ) <<1) - 4096;
1056 v[1] = ( ( (bits[1]>>4) + (bits[2]<<4) ) <<1) - 4096;
1057 v[2] = ( ( bits[3] + ((bits[4]&15)<<8) ) <<1) - 4096;
1058 v[3] = -360*(bits[4]>>4)/16;
1059 v[4] = 360*bits[5]/256;
1072 for (j = 0;j < 32;j++)
1083#define LOADPROGRESSWEIGHT_SOUND 1.0
1084#define LOADPROGRESSWEIGHT_MODEL 4.0
1085#define LOADPROGRESSWEIGHT_WORLDMODEL 30.0
1086#define LOADPROGRESSWEIGHT_WORLDMODEL_INIT 2.0
1265 if (aborteddownload)
1281 aborteddownload =
false;
1335 if (aborteddownload)
1337 aborteddownload =
false;
1379 Con_Printf(
"cl_begindownloads is only valid once per match\n");
1389 size_t existingsize;
1390 const char *extension;
1395 size_t inflated_size;
1408 Con_Printf(
"Cannot inflate download, possibly corrupt or zlib not present\n");
1427 if ((
int)existingsize !=
size || existingcrc != crc)
1458 if (!strcasecmp(extension,
"pak") || !strcasecmp(extension,
"pk3") || !strcasecmp(extension,
"dpk"))
1465 Con_Printf(
"Download \"%s\" is corrupt (%i bytes, %i CRC, should be %i bytes, %i CRC), discarding\n",
cls.
qw_downloadname,
size, crc, (
int)
cls.
qw_downloadmemorycursize, (
int)
CRC_Block(
cls.
qw_downloadmemory,
cls.
qw_downloadmemorycursize));
1501 Con_Printf(
"CL_ParseDownload: received %i bytes with no download active\n",
size);
1523 Con_Printf(
"cl_downloadbegin: received bogus information\n");
1565 Con_Printf(
"Malformed cl_downloadfinished command\n");
1683 int nummodels, numsounds;
1720 Host_Error(
"CL_ParseServerInfo: Server is unrecognized protocol number (%i)",
i);
1740 Host_Error(
"CL_ParseServerInfo: unable to switch to server specified gamedir");
1779 Con_Printf(
"\n\n<===================================>\n\n\2%s\n", str);
1835 Con_Printf(
"\n<===================================>\n\n\2%s\n", str);
1841 for (nummodels=1 ; ; nummodels++)
1847 Host_Error (
"Server sent too many model precaches");
1853 for (numsounds=1 ; ; numsounds++)
1859 Host_Error(
"Server sent too many sound precaches");
1878 for (
i = 1;
i < nummodels;
i++)
1936 Con_Printf (
"Auto-recording to %s.\n", demofile);
1985 Con_DPrintf(
"CL_ValidateState: no such frame %i in \"%s\" (which has %i frames)\n", s->
frame,
model->name,
model->numframes);
1987 Con_DPrintf(
"CL_ValidateState: no such skin %i in \"%s\" (which has %i skins)\n", s->
skin,
model->name,
model->numskins);
1993 float odelta[3], adelta[3];
2045 else if (
DotProduct(odelta, odelta) > 1000*1000
2128 for (
i = 0;
i < 3;
i++)
2183 for (
i = 0;
i < 3;
i++)
2308 int sound_num, vol, atten;
2316 if (sound_num < 0 || sound_num >=
MAX_SOUNDS)
2331 int modelindex, startframe, framecount, framerate;
2345 int modelindex, startframe, framecount, framerate;
2363 Con_Printf(
"CL_NewBeam: invalid entity number %i\n", ent);
2374 if (
b->entity == ent)
2385 b->lightning = lightning;
2406 Con_Printf(
"CL_ParseBeam: invalid entity number %i\n", ent);
2421 int colorStart, colorLength,
count;
2422 float velspeed, radius;
2423 unsigned char *tempcolor;
2531 VectorSet(pos2, pos[0] + radius, pos[1] + radius, pos[2] + radius);
2532 VectorSet(pos, pos[0] - radius, pos[1] - radius, pos[2] - radius);
2694 vel1[0] = -velspeed;
2695 vel1[1] = -velspeed;
2696 vel1[2] = -velspeed;
2804 CL_AllocLightFlash(
NULL, &tempmatrix, 350,
color[0],
color[1],
color[2], 700, 0.5,
NULL, -1,
true, 1, 0.25, 0.25, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
2817 CL_AllocLightFlash(
NULL, &tempmatrix, 350,
color[0],
color[1],
color[2], 700, 0.5,
NULL, -1,
true, 1, 0.25, 0.25, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
2844 CL_AllocLightFlash(
NULL, &tempmatrix, radius,
color[0],
color[1],
color[2], radius / velspeed, velspeed,
NULL, -1,
true, 1, 0.25, 1, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
2897 if (colorLength == 0)
2900 tempcolor =
palette_rgb[(rand()%colorLength) + colorStart];
2901 color[0] = tempcolor[0] * (2.0f / 255.0f);
2902 color[1] = tempcolor[1] * (2.0f / 255.0f);
2903 color[2] = tempcolor[2] * (2.0f / 255.0f);
2905 CL_AllocLightFlash(
NULL, &tempmatrix, 350,
color[0],
color[1],
color[2], 700, 0.5,
NULL, -1,
true, 1, 0.25, 0.25, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
2913 CL_ParticleTrail(
EFFECT_TE_TEI_G3, 1, pos, pos2,
dir,
dir,
NULL, 0,
true,
true,
NULL,
NULL, 1);
2958 CL_ParticleTrail(effectindex, 1, start, end,
vec3_origin,
vec3_origin, entityindex > 0 ?
cl.
entities + entityindex :
NULL, 0,
true,
true,
NULL,
NULL, 1);
2963 int effectindex,
count;
2981typedef struct cl_iplog_item_s
2997 size_t sz_name, sz_address;
2998 if (!address || !address[0] || !
name || !
name[0])
3003 Con_DPrintf(
"CL_IPLog_Add(\"%s\", \"%s\", %i, %i);\n", address,
name, checkexisting, addtofile);
3030 sz_address =
strlen(address) + 1;
3045#ifndef DP_MOBILETOUCH
3055 int i, len, linenumber;
3056 char *text, *textend;
3057 unsigned char *filedata;
3065#ifndef DP_MOBILETOUCH
3072 text = (
char *)filedata;
3073 textend = text + filesize;
3074 for (linenumber = 1;text < textend;linenumber++)
3076 for (len = 0;text < textend && *text !=
'\r' && *text !=
'\n';text++)
3077 if (len < (
int)
sizeof(line) - 1)
3078 line[len++] = *text;
3080 if (text < textend && *text ==
'\r' && text[1] ==
'\n')
3082 if (text < textend && *text ==
'\n')
3084 if (line[0] ==
'/' && line[1] ==
'/')
3087 address[
i] = line[
i];
3093 if (address[0] && line[
i])
3103 const char *addressprefix;
3114 if (addressprefix && addressprefix[0])
3115 Con_Printf(
"Listing iplog addresses beginning with %s\n", addressprefix);
3121 if (addressprefix && addressprefix[0])
3123 for (j = 0;addressprefix[j];j++)
3128 if (addressprefix[j])
3147 if (!strcmp(text,
"Client ping times:\n"))
3157 Con_Printf(
"ping reply but empty scoreboard?!?\n");
3164 if (!strncmp(text,
"host: ", 9))
3180 if ((*t >=
'0' && *t <=
'9') || *t ==
'-')
3183 while ((*t >=
'0' && *t <=
'9') || *t ==
'-')
3195 if (t[charindex] ==
'\n')
3209 if (!strncmp(t,
"unconnected\n", 12))
3223 if (!strncmp(text,
"players: ", 9))
3229 else if (!strstr(text,
": "))
3239 if (text[0] ==
'#' && text[1] >=
'0' && text[1] <=
'9')
3243 while (*t >=
'0' && *t <=
'9')
3262 for (len = 0;*t && *t !=
'\n';t++)
3263 if (len < (
int)
sizeof(temp) - 1)
3268 if (strcmp(temp,
"botclient")
3299 if (
cl.
time < newtime - 0.1)
3304 double timehigh = 0;
3427#define SHOWNET(x) if(cl_shownet.integer==2)Con_Printf("%3i:%s(%i)\n", cl_message.readcount-1, x, cmd);
3440 unsigned char cmdlog[32];
3441 const char *cmdlogname[32], *temp;
3442 int cmdindex, cmdcount = 0;
3443 qbool qwplayerupdatereceived;
3446 size_t cl_readstring_len;
3485 qwplayerupdatereceived =
false;
3490 Host_Error (
"CL_ParseServerMessage: Bad QW server message");
3500 cmdindex = cmdcount & 31;
3502 cmdlog[cmdindex] =
cmd;
3506 if (!cmdlogname[cmdindex])
3509 const char *d =
"<unknown>";
3510 cmdlogname[cmdindex] = d;
3518 char description[32*64], logtemp[64];
3520 dp_strlcpy(description,
"packet dump: ",
sizeof(description));
3528 dpsnprintf(logtemp,
sizeof(logtemp),
"%3i:%s ", cmdlog[
i], cmdlogname[
i]);
3529 dp_strlcat(description, logtemp,
sizeof(description));
3534 description[
strlen(description)-1] =
'\n';
3536 Host_Error(
"CL_ParseServerMessage: Illegible server message");
3559 cl_readstring_len =
dpsnprintf(vabuf,
sizeof(vabuf),
"\1%s", temp);
3588 for (
i=0 ;
i<3 ;
i++)
3604 Con_Printf (
"svc_lightstyle >= MAX_LIGHTSTYLES");
3624 Host_Error(
"CL_ParseServerMessage: svc_updatefrags >= cl.maxclients");
3631 Host_Error(
"CL_ParseServerMessage: svc_updateping >= cl.maxclients");
3638 Host_Error(
"CL_ParseServerMessage: svc_updatepl >= cl.maxclients");
3645 Host_Error(
"CL_ParseServerMessage: svc_updateentertime >= cl.maxclients");
3653 Host_Error (
"CL_ParseServerMessage: svc_spawnbaseline: invalid entity number %i",
i);
3684 Host_Error (
"svc_updatestatlong: %i is invalid",
i);
3705 for (
i = 0;
i < 3;
i++)
3731 Host_Error(
"CL_ParseServerMessage: svc_spawnbaseline: invalid entity number %i",
i);
3756 if (!qwplayerupdatereceived)
3758 qwplayerupdatereceived =
true;
3819 if (qwplayerupdatereceived)
3832 Host_Error (
"CL_ParseServerMessage: Bad server message");
3843 cmdindex = cmdcount & 31;
3845 cmdlog[cmdindex] =
cmd;
3852 cmdlogname[cmdindex] = temp;
3863 if (!cmdlogname[cmdindex])
3866 const char *d =
"<unknown>";
3867 cmdlogname[cmdindex] = d;
3875 char description[32*64], tempdesc[64];
3877 dp_strlcpy (description,
"packet dump: ",
sizeof(description));
3885 dpsnprintf (tempdesc,
sizeof (tempdesc),
"%3i:%s ", cmdlog[
i], cmdlogname[
i]);
3886 dp_strlcat (description, tempdesc,
sizeof (description));
3891 description[
strlen(description)-1] =
'\n';
3893 Host_Error (
"CL_ParseServerMessage: Illegible server message");
3899 Con_Print(
"<-- server to client keepalive\n");
3914 Host_Error(
"CL_ParseServerMessage: Server is unrecognized protocol number (%i)",
i);
3973 --cl_readstring_len;
3974 while(*temp >= 0x01 && *temp <= 0x1F)
3977 --cl_readstring_len;
3993 for (
i=0 ;
i<3 ;
i++)
4023 Con_Printf (
"svc_lightstyle >= MAX_LIGHTSTYLES");
4052 Con_DPrintf(
"svc_precache: Mod_ForName(\"%s\") failed\n", s);
4065 Con_DPrintf(
"svc_precache: S_PrecacheSound(\"%s\") failed\n", s);
4082 Host_Error (
"CL_ParseServerMessage: svc_updatename >= cl.maxclients");
4089 Host_Error (
"CL_ParseServerMessage: svc_updatefrags >= cl.maxclients");
4096 Host_Error (
"CL_ParseServerMessage: svc_updatecolors >= cl.maxclients");
4115 Host_Error (
"CL_ParseServerMessage: svc_spawnbaseline: invalid entity number %i",
i);
4123 Host_Error (
"CL_ParseServerMessage: svc_spawnbaseline2: invalid entity number %i",
i);
void CDAudio_Resume(void)
void CDAudio_Play(int track, qbool looping)
cvar_t cl_name
User-visible names of these CF_USERINFO cvars must be matched in CL_SetInfo()!
void CL_ForwardToServer(const char *s)
adds the string as a clc_stringcmd to the client message.
void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius)
model_t * CL_GetModelByIndex(int modelindex)
void CL_Stop_f(cmd_state_t *cmd)
void CL_WriteDemoMessage(sizebuf_t *message)
void EntityFrame4_CL_ReadFrame(void)
void EntityFrame5_CL_ReadFrame(void)
void EntityFrame_CL_ReadFrame(void)
void EntityFrameQuake_ReadEntity(int bits)
void EntityFrameQuake_ISeeDeadEntities(void)
void EntityStateQW_ReadPlayerUpdate(void)
void EntityFrameQW_CL_ReadFrame(qbool delta)
void CL_DisconnectEx(qbool kicked, const char *fmt,...)
cvar_t cl_autodemo_delete
void CL_UpdateRenderEntity(entity_render_t *ent)
void CL_Effect(vec3_t org, model_t *model, int startframe, int framecount, float framerate)
void CL_AllocLightFlash(entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, char *cubemapname, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags)
void CL_Locs_Reload_f(cmd_state_t *cmd)
cvar_t cl_autodemo_nameformat
void CL_SetInfo(const char *key, const char *value, qbool send, qbool allowstarkey, qbool allowmodel, qbool quiet)
void CL_ExpandEntities(int num)
cvar_t con_chatsound_team_file
static void QW_CL_ParseDownload(void)
#define LOADPROGRESSWEIGHT_WORLDMODEL_INIT
void CL_Parse_Shutdown(void)
static void QW_CL_ProcessUserInfo(int slot)
static void QW_CL_Skins_f(cmd_state_t *cmd)
static void CL_SetupWorldModel(void)
cvar_t cl_joinbeforedownloadsfinish
cvar_t cl_sound_ric_gunshot
static void CL_ParseTempEntity(void)
static void CL_DownloadFinished_f(cmd_state_t *cmd)
cvar_t cl_readpicture_force
void CL_Parse_ErrorCleanUp(void)
static void CL_SignonReply(int signon_stage)
static void CL_ParsePointParticles1(void)
cvar_t cl_sound_hknighthit
static void QW_CL_RequestNextDownload(void)
static cl_iplog_item_t * cl_iplog_items
static void CL_ParseBaseline(entity_t *ent, int large)
void CL_ParseEntityLump(char *entdata)
cvar_t cl_serverextension_download
static void QW_CL_Changing_f(cmd_state_t *cmd)
#define LOADPROGRESSWEIGHT_WORLDMODEL
static void QW_CL_ServerInfo(void)
cvar_t cl_gameplayfix_soundsmovewithentities
static void CL_SendPlayerInfo(void)
static void QW_CL_ParseModelList(void)
static int cl_iplog_maxitems
static void CL_ParseBeam(model_t *m, int lightning)
static void CL_IPLog_List_f(cmd_state_t *cmd)
static void CL_DownloadBegin_f(cmd_state_t *cmd)
cvar_t cl_nettimesyncboundmode
void CL_MoveLerpEntityStates(entity_t *ent)
static const vec3_t defaultmins
void CL_NewBeam(int ent, vec3_t start, vec3_t end, model_t *m, int lightning)
static void CL_ParseEffect2(void)
void CL_ValidateState(entity_state_t *s)
static void CL_StopDownload(int size, int crc)
static void CL_UpdateItemsAndWeapon(void)
static void QW_CL_NextUpload_f(cmd_state_t *cmd)
static qbool cl_iplog_loaded
static void CL_ParseTrailParticles(void)
cvar_t cl_nettimesyncfactor
static const vec3_t defaultmaxs
static void QW_CL_UpdateUserInfo(void)
static void CL_ParseServerInfo(void)
static int cl_iplog_numitems
static void CL_ParseStatic(int large)
static void CL_ParseStaticSound(int large)
#define LOADPROGRESSWEIGHT_SOUND
static void CL_IPLog_Load(void)
static void CL_ParseDownload(void)
cvar_t cl_nettimesyncboundtolerance
cvar_t cl_worldnamenoextension
static void CL_BeginDownloads_f(cmd_state_t *cmd)
#define LOADPROGRESSWEIGHT_MODEL
static qbool QW_CL_CheckOrDownloadFile(const char *filename)
static void QW_CL_StopUpload_f(cmd_state_t *cmd)
void CL_KeepaliveMessage(qbool readmessages)
static void CL_IPLog_Add(const char *address, const char *name, qbool checkexisting, qbool addtofile)
static qbool CL_ExaminePrintString(const char *text)
static void CL_SetSignonStage_WithMsg(int signon_stage)
void QW_CL_StartUpload(unsigned char *data, int size)
static void CL_NetworkTimeReceived(double newtime)
static void CL_BeginDownloads(qbool aborteddownload)
static void QW_CL_SetInfo(void)
static void CL_ParseStartSoundPacket(int largesoundindex)
static unsigned char olddata[NET_MAXMESSAGE]
static void QW_CL_ParseNails(void)
static void CL_StopDownload_f(cmd_state_t *cmd)
const char * svc_strings[128]
const char * qw_svc_strings[128]
static void CL_ParseClientdata(void)
cvar_t developer_networkentities
void CL_ParseServerMessage(void)
static void CL_ParseEffect(void)
static void QW_CL_ParseSoundList(void)
void CL_Parse_DumpPacket(void)
static void CL_ParsePointParticles(void)
cvar_t cl_sound_wizardhit
void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qbool spawndlight, qbool spawnparticles, float tintmins[4], float tintmaxs[4], float fade)
void CL_ParticleEffect(int effectnameindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor)
void CL_ParticleRain(const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, int type)
void CL_ParticleExplosion2(const vec3_t org, int colorStart, int colorLength)
void CL_ParticleCube(const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, vec_t gravity, vec_t randomvel)
void CL_ParticleExplosion(const vec3_t org)
void CL_ParseParticleEffect(void)
@ EFFECT_TE_SUPERSPIKEQUAD
@ EFFECT_TE_EXPLOSIONQUAD
@ EFFECT_TE_TEI_PLASMAHIT
@ EFFECT_TE_TEI_BIGEXPLOSION
void SCR_BeginLoadingPlaque(qbool startup)
void SCR_CenterPrint(const char *str)
void SHOWLMP_decodehide(void)
void SCR_PopLoadingScreen(qbool redraw)
void SHOWLMP_decodeshow(void)
void SCR_PushLoadingScreen(const char *msg, float len_in_parent)
char cl_connect_status[MAX_QPATH]
User-friendly connection status for the menu and/or loading screen, colours and not supported.
#define LIGHTFLAG_NORMALMODE
#define LIGHTFLAG_REALTIMEMODE
#define CL_MAX_DOWNLOADACKS
@ CL_PARSETEXTMODE_STATUS_PLAYERIP
@ CL_PARSETEXTMODE_STATUS_PLAYERID
@ CL_PARSETEXTMODE_STATUS
void Cbuf_AddText(cmd_state_t *cmd, const char *text)
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
void Cmd_ExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex)
Parses a single line of text into arguments and tries to execute it.
cmd_state_t * cmd_local
command interpreter for local commands injected by SVQC, CSQC, MQC, server or client engine code uses...
#define CF_READONLY
cvar cannot be changed from the console or the command buffer, and is considered CF_PERSISTENT
@ src_local
from the command buffer
static int Cmd_Argc(cmd_state_t *cmd)
static const char * Cmd_Argv(cmd_state_t *cmd, int arg)
Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are alwa...
#define CF_CLIENT
cvar/command that only the client can change/execute
#define CF_CLIENT_FROM_SERVER
command that the server is allowed to execute on the client
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
void Collision_Cache_Reset(qbool resetlimits)
unsigned short CRC_Block(const unsigned char *data, size_t size)
#define IS_NEXUIZ_DERIVED(g)
#define IS_OLDNEXUIZ_DERIVED(g)
@ GAME_TENEBRAE
full of evil hackery
void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, const char *value)
size_t InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuesize)
Returns the number of bytes written to *value excluding the \0 terminator.
char * MSG_ReadString(sizebuf_t *sb, char *string, size_t maxstring)
float MSG_ReadAngle(sizebuf_t *sb, protocolversion_t protocol)
void MSG_WriteShort(sizebuf_t *sb, int c)
void MSG_ReadVector(sizebuf_t *sb, vec3_t v, protocolversion_t protocol)
void MSG_WriteString(sizebuf_t *sb, const char *s)
float MSG_ReadCoord32f(sizebuf_t *sb)
size_t MSG_ReadBytes(sizebuf_t *sb, size_t numbytes, unsigned char *out)
float MSG_ReadAngle16i(sizebuf_t *sb)
void MSG_WriteByte(sizebuf_t *sb, int c)
float MSG_ReadCoord(sizebuf_t *sb, protocolversion_t protocol)
float MSG_ReadCoord16i(sizebuf_t *sb)
size_t MSG_ReadString_len(sizebuf_t *sb, char *string, size_t maxstring)
Same as MSG_ReadString except it returns the number of bytes written to *string excluding the \0 term...
void MSG_WriteChar(sizebuf_t *sb, int c)
char com_token[MAX_INPUTLINE]
char * va(char *buf, size_t buflen, const char *format,...)
void SZ_HexDumpToConsole(const sizebuf_t *buf)
qbool COM_ParseToken_Simple(const char **datapointer, qbool returnnewline, qbool parsebackslash, qbool parsecomments)
void SZ_Write(sizebuf_t *buf, const unsigned char *data, int length)
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
@ PROTOCOL_DARKPLACES2
various changes
@ PROTOCOL_DARKPLACES4
various changes
@ PROTOCOL_NEHAHRABJP2
same as NEHAHRABJP but with 16bit soundindex
@ PROTOCOL_DARKPLACES3
uses EntityFrame4 entity snapshot encoder/decoder which is broken, this attempted to do partial snaps...
@ PROTOCOL_NEHAHRABJP
same as QUAKEDP but with 16bit modelindex
@ PROTOCOL_DARKPLACES5
uses EntityFrame5 entity snapshot encoder/decoder which is based on a Tribes networking article at ht...
@ PROTOCOL_DARKPLACES7
added QuakeWorld-style movement protocol to allow more consistent prediction
@ PROTOCOL_QUAKEDP
darkplaces extended quake protocol (used by TomazQuake and others), backwards compatible as long as n...
@ PROTOCOL_QUAKE
quake (aka netquake/normalquake/nq) protocol
@ PROTOCOL_DARKPLACES8
added parting messages. WIP
@ PROTOCOL_NEHAHRABJP3
same as NEHAHRABJP2 but with some changes
@ PROTOCOL_NEHAHRAMOVIE
Nehahra movie protocol, a big nasty hack dating back to early days of the Quake Standards Group (but ...
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
@ PROTOCOL_DARKPLACES1
uses EntityFrame entity snapshot encoder/decoder which is a QuakeWorld-like entity snapshot delta com...
#define dp_strlcat(dst, src, dsize)
#define dp_strlcpy(dst, src, dsize)
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
void Con_ClearNotify(void)
Clear all notify lines.
void Con_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
void Log_Printf(const char *logfilename, const char *fmt,...)
void CSQC_AddPrintText(const char *msg, size_t msg_len)
void CSQC_UpdateNetworkTimes(double newtime, double oldtime)
void CL_VM_Parse_StuffCmd(const char *msg, size_t msg_len)
void CL_VM_UpdateIntermissionState(int intermission)
qbool CL_VM_Event_Sound(int sound_num, float fvolume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed)
void CSQC_ReadEntities(void)
qbool CL_VM_Parse_TempEntity(void)
void CL_VM_Parse_CenterPrint(const char *msg, size_t msg_len)
void Cvar_SetValueQuick(cvar_t *var, float value)
void Cvar_SetQuick(cvar_t *var, const char *value)
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
const char * FS_FileExtension(const char *in)
unsigned char * FS_Inflate(const unsigned char *data, size_t size, size_t *inflated_size, mempool_t *mempool)
qfile_t * FS_OpenVirtualFile(const char *filepath, qbool quiet)
qbool FS_WriteFile(const char *filename, const void *data, fs_offset_t len)
qbool FS_ChangeGameDirs(int numgamedirs, const char *gamedirs[], qbool failmissing)
unsigned char * FS_LoadFile(const char *path, mempool_t *pool, qbool quiet, fs_offset_t *filesizepointer)
qfile_t * FS_OpenRealFile(const char *filepath, const char *mode, qbool quiet)
void FS_UnloadPacks_dlcache(void)
static int(ZEXPORT *qz_inflate)(z_stream *strm
void FS_StripExtension(const char *in, char *out, size_t size_out)
int FS_Close(qfile_t *file)
int FS_Printf(qfile_t *file, const char *format,...)
int FS_CRCFile(const char *filename, size_t *filesizepointer)
int FS_CheckNastyPath(const char *path, qbool isgamedir)
const char * FS_FileExists(const char *filename)
Look for a file in the packages and in the filesystem Returns its canonical name (same case as used i...
GLsizei const GLfloat * value
GLenum GLenum GLsizei count
GLsizeiptr const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
void Host_Error(const char *error,...)
void Curl_Register_predownload(void)
qbool Curl_Have_forthismap(void)
void Curl_CancelAll(void)
#define bound(min, num, max)
#define lhrandom(MIN, MAX)
LadyHavoc: this function never returns exactly MIN or exactly MAX, because of a QuakeC bug in id1 whe...
#define VectorSet(vec, x, y, z)
#define VectorSubtract(a, b, out)
#define VectorCopy(in, out)
void Matrix4x4_CreateTranslate(matrix4x4_t *out, double x, double y, double z)
void Matrix4x4_CreateFromQuakeEntity(matrix4x4_t *out, double x, double y, double z, double pitch, double yaw, double roll, double scale)
model_t * Mod_ForName(const char *name, qbool crash, qbool checkdisk, const char *parentname)
void Mod_PurgeUnused(void)
model_t * Mod_FindName(const char *name, const char *parentname)
void Mod_FreeQ3Shaders(void)
char cl_readstring[MAX_INPUTLINE]
void NetConn_ClientFrame(void)
int NetConn_IsLocalGame(void)
int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qbool quakesignon_suppressreliables)
unsigned char palette_rgb[256][3]
entity_state_t defaultstate
const char * Protocol_NameForEnum(protocolversion_t p)
protocolversion_t Protocol_EnumForNumber(int n)
#define svc_pointparticles1
#define qw_svc_packetentities
#define QW_TE_TAREXPLOSION
#define qw_svc_entgravity
#define qw_svc_sellscreen
#define QW_TE_KNIGHTSPIKE
#define svc_spawnstaticsound2
#define svc_spawnstaticsound
#define EF_RESTARTANIM_BIT
#define qw_svc_updateuserinfo
#define QW_TE_LIGHTNINGBLOOD
#define qw_svc_spawnstaticsound
#define qw_svc_serverinfo
#define qw_svc_updatefrags
#define svc_killedmonster
#define qw_svc_updatestat
#define svc_spawnbaseline2
#define qw_svc_serverdata
#define qw_svc_updateping
#define TE_TEI_BIGEXPLOSION
#define qw_svc_playerinfo
#define qw_svc_lightstyle
#define qw_svc_temp_entity
#define DEFAULT_VIEWHEIGHT
#define TE_SUPERSPIKEQUAD
#define SU_INWATER
no data follows, the bit is it
#define svc_updatestatubyte
#define PFLAGS_FULLDYNAMIC
#define SND_SPEEDUSHORT4000
#define svc_pointparticles
#define svc_trailparticles
#define qw_svc_muzzleflash
#define qw_svc_spawnstatic
#define qw_svc_deltapacketentities
#define SU_EXTEND2
another byte to follow, future expansion
#define RENDER_COLORMAPPED
#define qw_svc_updatestatlong
#define qw_svc_spawnbaseline
#define SU_VIEWZOOM
byte factor (0 = 0.0 (not valid), 255 = 1.0)
#define svc_spawnbaseline
#define qw_svc_intermission
#define qw_svc_updateentertime
#define qw_svc_disconnect
#define SU_ONGROUND
no data follows, the bit is it
#define qw_svc_chokecount
#define qw_svc_foundsecret
#define qw_svc_killedmonster
#define qw_svc_centerprint
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
#define MAX_STYLESTRING
max length of flicker pattern for light style
#define MAX_OSPATH
max length of a filesystem pathname
#define MAX_EDICTS
max number of objects in game world at once (32768 protocol limit)
#define NET_MAXMESSAGE
max reliable packet size (sent as multiple fragments of MAX_PACKETFRAGMENT)
#define MAX_SOUNDS
max number of sounds loaded at once
#define MAX_QPATH
max length of a quake game pathname
#define MAX_SCOREBOARD
max number of players in game at once (255 protocol limit)
#define MAX_MODELS
max number of models loaded at once (including during level transitions)
#define STAT_MONSTERS
bumped by svc_killedmonster
#define STAT_SECRETS
bumped on client side by svc_foundsecret
#define STAT_ACTIVEWEAPON
#define STAT_ITEMS
FTE, DP.
#define STAT_VIEWHEIGHT
FTE, DP.
void R_Modules_NewMap(void)
int R_SetSkyBox(const char *sky)
void S_StaticSound(sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
void S_StopAllSounds(void)
int S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
S_StartSound returns the channel index, or -1 if an error occurred.
void S_PauseGameSounds(qbool toggle)
qbool S_IsSoundPrecached(const sfx_t *sfx)
void S_StopSound(int entnum, int entchannel)
int S_StartSound_StartPosition_Flags(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation, float startposition, int flags, float fspeed)
sfx_t * S_PrecacheSound(const char *name, qbool complain, qbool levelsound)
#define DEFAULT_SOUND_PACKET_ATTENUATION
#define DEFAULT_SOUND_PACKET_VOLUME
char qw_serverinfo[MAX_SERVERINFO_STRING]
char sound_name[MAX_SOUNDS][MAX_QPATH]
float movevars_entgravity
lightstyle_t * lightstyle
float movevars_waterfriction
vec3_t qw_intermission_origin
int parsingtextexpectingpingforscores
int parsingtextplayerindex
float movevars_jumpvelocity
int downloadmodel_current
float movevars_spectatormaxspeed
float last_received_message
unsigned char * entities_active
uint8_t opt_inputs_since_update
unsigned char ts_error_num
int qw_modelindex_s_explod
float movevars_airaccel_qw
struct sfx_s * sound_precache[MAX_SOUNDS]
char worldbasename[MAX_QPATH]
struct model_s * worldmodel
float movevars_maxairspeed
struct model_s * model_precache[MAX_MODELS]
float movevars_accelerate
float movevars_airaccel_sideways_friction
float movevars_edgefriction
char model_name[MAX_MODELS][MAX_QPATH]
float ts_error_stor[NUM_TS_ERRORS]
char worldname[MAX_QPATH]
entity_t * static_entities
float movevars_airaccelerate
float movevars_stepheight
char worldmessage[MAX_QPATH]
cl_parsingtextmode_t parsingtextmode
vec3_t qw_intermission_angles
int downloadsound_current
float movevars_wateraccelerate
char worldnamenoextension[MAX_QPATH]
float movevars_wallfriction
unsigned char * caughtcsprogsdata
unsigned int servermovesequence
mempool_t * permanentmempool
int qw_downloadspeedcount
unsigned char * qw_downloadmemory
qbool qw_download_deflate
fs_offset_t demo_lastcsprogssize
fs_offset_t caughtcsprogsdatasize
cl_downloadack_t dp_downloadack[CL_MAX_DOWNLOADACKS]
int qw_downloadmemorymaxsize
int qw_downloadmemorycursize
protocolversion_t protocol
qw_downloadtype_t qw_downloadtype
char qw_downloadname[MAX_QPATH]
unsigned char * qw_uploaddata
command interpreter state - the tokenizing and execution of commands, as well as pointers to which cv...
framegroupblend_t framegroupblend[MAX_FRAMEGROUPBLENDS]
unsigned short modelindex
unsigned char lightpflags
entity_state_t state_baseline
entity_persistent_t persistent
entity_state_t state_current
entity_state_t state_previous
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
char map[MAX_STYLESTRING]
unsigned int incoming_sequence
sizebuf_t message
writing buffer to send to peer as the next reliable message can be added to at any time,...
struct netconn_t::netconn_qw_s qw
char fog_height_texturename[64]
char name[MAX_SCOREBOARDNAME]
char qw_userinfo[MAX_USERINFO_STRING]
qbool active
false if only a net client
struct model_s * models[MAX_MODELS]
size_t Sys_TimeString(char buf[], size_t bufsize, const char *timeformat)
void Sys_AllowProfiling(qbool enable)
double Sys_DirtyTime(void)
int Sys_CheckParm(const char *parm)
void World_SetSize(world_t *world, const char *filename, const vec3_t mins, const vec3_t maxs, prvm_prog_t *prog)
void World_Start(world_t *world)
void World_Physics_Frame(world_t *world, double frametime, double gravity)
#define Mem_Alloc(pool, size)
#define Mem_CheckSentinelsGlobal()