40cvar_t csqc_lowres = {
CF_CLIENT,
"csqc_lowres",
"0",
"make EXT_CSQC functions CSQC_UpdateView(), setproperty(), getproperty() use the virtual 2D resolution (FTEQW/QSS behaviour) instead of the real resolution (DP behaviour); this mode is always used for the CSQC_SIMPLE (aka hud-only) CSQC_DrawHud() parameters; see cvars vid_conheight and vid_conwidth"};
64cvar_t cl_autodemo_delete = {
CF_CLIENT,
"cl_autodemo_delete",
"0",
"3: automatically delete every newly recorded demo unless this cvar is set to 2 during a game, in case something interesting happened (cvar will be automatically set back to 3); 0: keep every newly recorded demo unless this cvar is set to 1 during a game, in case nothing interesting happened (cvar will be automatically set back to 0). Technically speaking, the value is a bitmask: bit 1 defines behaviour for all demos, bit 0 overrides behaviour for the demo currently being recorded" };
90cvar_t qport = {
CF_CLIENT,
"qport",
"0",
"identification key for playing on qw servers (allows you to maintain a connection to a quakeworld server even if your port changes)"};
92cvar_t cl_prydoncursor = {
CF_CLIENT,
"cl_prydoncursor",
"0",
"enables a mouse pointer which is able to click on entities in the world, useful for point and click mods, see PRYDON_CLIENTCURSOR extension in dpextensions.qc"};
97cvar_t cl_locs_enable = {
CF_CLIENT |
CF_ARCHIVE,
"locs_enable",
"1",
"enables replacement of certain % codes in chat messages: %l (location), %d (last death location), %h (health), %a (armor), %x (rockets), %c (cells), %r (rocket launcher status), %p (powerup status), %w (weapon status), %t (current time in level)"};
108cvar_t cl_maxfps = {
CF_CLIENT |
CF_ARCHIVE,
"cl_maxfps",
"0",
"maximum fps cap, 0 = unlimited, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"};
112cvar_t cl_areagrid_link_SOLID_NOT = {
CF_CLIENT,
"cl_areagrid_link_SOLID_NOT",
"1",
"set to 0 to prevent SOLID_NOT entities from being linked to the area grid, and unlink any that are already linked (in the code paths that would otherwise link them), for better performance"};
134 memset (&
cl, 0,
sizeof(
cl));
238 if (!allowstarkey && key[0] ==
'*')
240 if (!allowmodel && (!strcasecmp(key,
"pmodel") || !strcasecmp(key,
"emodel")))
242 for (
i = 0;key[
i];
i++)
262 else if (!strcasecmp(key,
"_cl_name") || !strcasecmp(key,
"name"))
267 else if (!strcasecmp(key,
"playermodel"))
272 else if (!strcasecmp(key,
"playerskin"))
277 else if (!strcasecmp(key,
"topcolor"))
282 else if (!strcasecmp(key,
"bottomcolor"))
287 else if (!strcasecmp(key,
"rate"))
292 else if (!strcasecmp(key,
"rate_burstsize"))
302 int i, oldmaxentities;
307 Sys_Error(
"CL_ExpandEntities: cl.entities not initialized");
328 int oldmaxcsqcrenderentities;
338 if (oldcsqcrenderentities)
380 va_start(argptr,fmt);
386 dpsnprintf(reason,
sizeof(reason),
"Disconnect by user");
421 unsigned char bufdata[520];
429 memset(&
buf, 0,
sizeof(
buf));
431 buf.maxsize =
sizeof(bufdata);
457 if(fmt && reason[0] !=
'\0')
503 Con_Printf(
CON_WARN "Reconnect to what server? (you have not connected to a server yet)\n");
527 Con_Print(
"reconnect : wait for signon messages again\n");
532 Con_Print(
"reconnect: no signon, ignoring reconnect\n");
550 Con_Print(
"connect <serveraddress> [<key> <value> ...]: connect to a multiplayer game\n");
600 else if(firstarg < -1)
612 Con_Printf(
CON_ERROR "Connect: failed, unable to find a network socket suitable to reach %s\n", address);
636 const char* modelname;
644 modelname =
"--no model--";
645 Con_Printf(
"%3i: %-25s:%4i (%5i %5i %5i) [%3i %3i %3i] %4.2f %5.3f\n",
i, modelname, ent->
render.
framegroupblend[0].
frame, (
int) ent->
state_current.
origin[0], (
int) ent->
state_current.
origin[1], (
int) ent->
state_current.
origin[2], (
int) ent->
state_current.
angles[0] % 360, (
int) ent->
state_current.
angles[1] % 360, (
int) ent->
state_current.
angles[2] % 360, ent->
render.
scale, ent->
render.
alpha);
662 Con_Printf(
"%3s: %-30s %-8s %-8s\n",
"ID",
"Name",
"Type",
"Triangles");
669 if(
model->loaded ||
i == 1)
672 Con_Printf(
"%3i: %-30s %-30s\n",
i,
model->name,
"--no local model found--");
718#ifdef MATRIX4x4_OPENGLORIENTATION
728#ifdef MATRIX4x4_OPENGLORIENTATION
746 ent->
mins[0] = org[0] - 16;
747 ent->
mins[1] = org[1] - 16;
748 ent->
mins[2] = org[2] - 16;
749 ent->
maxs[0] = org[0] + 16;
750 ent->
maxs[1] = org[1] + 16;
751 ent->
maxs[2] = org[2] + 16;
806 memset (render, 0,
sizeof(*render));
824 Con_Printf(
"CL_Effect: framerate %f is < 1\n", framerate);
829 Con_Printf(
"CL_Effect: framecount %i is < 1\n", framecount);
841 e->
endframe = startframe + framecount;
852void 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)
868 memset (dl, 0,
sizeof(*dl));
883 dl->
decay = decay / radius;
890 if (cubemapname && cubemapname[0])
893 dl->
shadow = shadowenable;
951 R_RTLight_Update(&dl->
rtlight,
false, &tempmatrix, dl->
color, dl->
style, dl->
cubemapname, dl->
shadow, dl->
corona, dl->
coronasizescale, dl->
ambientscale, dl->
diffusescale, dl->
specularscale, dl->
flags);
1016 else if (
frame == 30)
f =
f + 8;
1017 else if (
frame == 31)
f =
f + 12;
1018 else if (
frame == 32)
f =
f + 11;
1019 else if (
frame == 33)
f =
f + 10;
1020 else if (
frame == 34)
f =
f + 4;
1025 else if (
frame == 36)
f =
f + 10;
1026 else if (
frame == 37)
f =
f + 10;
1027 else if (
frame == 38)
f =
f + 8;
1028 else if (
frame == 39)
f =
f + 4;
1029 else if (
frame == 40)
f =
f + 2;
1047 flagrender->
alpha = 1;
1063 const unsigned char *cbcolor;
1092 if (recursionlimit < 1)
1132 if(!
r->entitynumber)
1136 matrix = &
r->matrix;
1147 matrix = &tempmatrix;
1172 interpolate =
false;
1182 lerp =
max(0, lerp);
1187 if (delta[0] < -180) delta[0] += 360;
else if (delta[0] >= 180) delta[0] -= 360;
1188 if (delta[1] < -180) delta[1] += 360;
else if (delta[1] >= 180) delta[1] -= 360;
1189 if (delta[2] < -180) delta[2] += 360;
else if (delta[2] >= 180) delta[2] -= 360;
1369 CL_ParticleTrail(
EFFECT_EF_FLAME,
bound(0,
cl.
time -
cl.
oldtime, 0.1),
origin,
origin,
vec3_origin,
vec3_origin,
NULL, 0,
false,
true,
NULL,
NULL, 1);
1371 CL_ParticleTrail(
EFFECT_EF_STARDUST,
bound(0,
cl.
time -
cl.
oldtime, 0.1),
origin,
origin,
vec3_origin,
vec3_origin,
NULL, 0,
false,
true,
NULL,
NULL, 1);
1418 CL_ParticleTrail(trailtype,
bound(0,
cl.
time -
cl.
oldtime, 0.1), e->
persistent.
trail_origin,
origin, vel, vel, e, e->
state_current.
glowcolor,
false,
true,
NULL,
NULL, 1);
1595 dlightradius =
max(dlightradius, 200);
1596 dlightcolor[0] += 1.50f;
1597 dlightcolor[1] += 1.50f;
1598 dlightcolor[2] += 1.50f;
1602 dlightradius =
max(dlightradius, 400);
1603 dlightcolor[0] += 3.00f;
1604 dlightcolor[1] += 3.00f;
1605 dlightcolor[2] += 3.00f;
1610 dlightradius =
max(dlightradius, 200);
1611 dlightcolor[0] += 1.50f;
1612 dlightcolor[1] += 0.15f;
1613 dlightcolor[2] += 0.15f;
1617 dlightradius =
max(dlightradius, 200);
1618 dlightcolor[0] += 0.15f;
1619 dlightcolor[1] += 0.15f;
1620 dlightcolor[2] += 1.50f;
1623 CL_ParticleTrail(
EFFECT_EF_FLAME, 1,
origin,
origin,
vec3_origin,
vec3_origin,
NULL, 0,
true,
false,
NULL,
NULL, 1);
1625 CL_ParticleTrail(
EFFECT_EF_STARDUST, 1,
origin,
origin,
vec3_origin,
vec3_origin,
NULL, 0,
true,
false,
NULL,
NULL, 1);
1635 trace =
CL_TraceLine(
origin,
v2,
MOVE_NOMONSTERS,
NULL,
SUPERCONTENTS_SOLID |
SUPERCONTENTS_SKY, 0, 0,
collision_extendmovelength.
value,
true,
false,
NULL,
false,
false);
1640 R_RTLight_Update(&
r_refdef.
scene.
templights[
r_refdef.
scene.
numlights],
false, &tempmatrix,
color, -1,
NULL,
true, 0, 0.25, 0, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
1679 if (light[0] == 0 && light[1] == 0 && light[2] == 0)
1686 R_RTLight_Update(&
r_refdef.
scene.
templights[
r_refdef.
scene.
numlights],
false, &dlightmatrix, light, e->
state_current.
lightstyle, e->
state_current.
skin > 0 ?
va(vabuf,
sizeof(vabuf),
"cubemaps/%i", e->
state_current.
skin) :
NULL, !(e->
state_current.
lightpflags &
PFLAGS_NOSHADOW), (e->
state_current.
lightpflags &
PFLAGS_CORONA) != 0, 0.25, 0, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
1698 R_RTLight_Update(&
r_refdef.
scene.
templights[
r_refdef.
scene.
numlights],
false, &dlightmatrix, dlightcolor, -1,
NULL,
true, 1, 0.25, 0, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
1707 CL_ParticleTrail(trailtype, 1,
origin,
origin,
vec3_origin,
vec3_origin,
NULL, e->
state_current.
glowcolor,
true,
false,
NULL,
NULL, 1);
1802 if (intframe < 0 || intframe >= e->
endframe)
1804 memset(e, 0,
sizeof(*e));
1810 if (intframe != e->
frame)
1812 e->
frame = intframe;
1840 entrender->
alpha = 1;
1888 vec3_t dist, org, start, end;
1915 R_RTLight_Update(&
r_refdef.
scene.
templights[
r_refdef.
scene.
numlights],
false, &tempmatrix, dlightcolor, -1,
NULL,
true, 1, 0.25, 1, 0, 0,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
1928 if (dist[1] == 0 && dist[0] == 0)
1938 yaw = atan2(dist[1], dist[0]) * 180 /
M_PI;
1942 forward =
sqrt (dist[0]*dist[0] + dist[1]*dist[1]);
1956 entrender->
model =
b->model;
1985 entrender->
alpha = 1;
1999 for (
i = 0;
i < 3;
i++)
2009 for (
i = 0;
i < 3;
i++)
2147 Con_Printf(
"\"fog_heighttexture\" is \"%f %f %f %f %f %f %f %f %f %s\"\n",
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);
2174 double timestart, timedelta;
2177 for (
i = 0;
i < 128;
i++)
2185 Con_Printf(
"%f seconds (%f fps)\n", timedelta, 128/timedelta);
2199 vec_t dist, bestdist;
2204 for (
i = 0;
i < 3;
i++)
2207 if (bestdist > dist || !best)
2225 dpsnprintf(
buffer, buffersize,
"LOC=%.0f:%.0f:%.0f", point[0], point[1], point[2]);
2233 next = &(*pointer)->
next;
2241 Con_Printf(
"CL_Locs_FreeNode: no such node! (%p)\n", (
void *)node);
2254 node->
name = (
char *)(node + 1);
2256 node->
name[namelen] = 0;
2292 Con_Printf(
"no loc point or box found for your location\n");
2306 char timestring[128];
2331 FS_Printf(
outfile,
"// %s %s saved by %s\n// x,y,z,x,y,z,\"name\"\n\n", locfilename, timestring,
engineversion);
2336 Con_Printf(
CON_WARN "Warning: writing loc file containing a mixture of qizmo-style points and proquake-style boxes may not work in qizmo or proquake!\n");
2344 const char *in = loc->
name;
2346 for (len = 0;len < (
int)
sizeof(
name) - 1 && *in;)
2348 if (*in ==
' ') {s =
"$loc_name_separator";in++;}
2349 else if (!strncmp(in,
"SSG", 3)) {s =
"$loc_name_ssg";in += 3;}
2350 else if (!strncmp(in,
"NG", 2)) {s =
"$loc_name_ng";in += 2;}
2351 else if (!strncmp(in,
"SNG", 3)) {s =
"$loc_name_sng";in += 3;}
2352 else if (!strncmp(in,
"GL", 2)) {s =
"$loc_name_gl";in += 2;}
2353 else if (!strncmp(in,
"RL", 2)) {s =
"$loc_name_rl";in += 2;}
2354 else if (!strncmp(in,
"LG", 2)) {s =
"$loc_name_lg";in += 2;}
2355 else if (!strncmp(in,
"GA", 2)) {s =
"$loc_name_ga";in += 2;}
2356 else if (!strncmp(in,
"YA", 2)) {s =
"$loc_name_ya";in += 2;}
2357 else if (!strncmp(in,
"RA", 2)) {s =
"$loc_name_ra";in += 2;}
2358 else if (!strncmp(in,
"MEGA", 4)) {s =
"$loc_name_mh";in += 4;}
2362 while (len < (
int)
sizeof(
name) - 1 && *s)
2366 name[len++] = *in++;
2372 FS_Printf(
outfile,
"%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,\"%s\"\n", loc->
mins[0], loc->
mins[1], loc->
mins[2], loc->
maxs[0], loc->
maxs[1], loc->
maxs[2], loc->
name);
2379 int i, linenumber, limit, len;
2381 char *filedata, *text, *textend, *linestart, *linetext, *lineend;
2407 textend = filedata + filesize;
2408 for (linenumber = 1;text < textend;linenumber++)
2411 for (;text < textend && *text !=
'\r' && *text !=
'\n';text++)
2414 if (text + 1 < textend && *text ==
'\r' && text[1] ==
'\n')
2419 while (lineend > linestart &&
ISWHITESPACE(lineend[-1]))
2422 while (linestart < lineend &&
ISWHITESPACE(*linestart))
2425 if (linestart + 2 <= lineend && !strncmp(linestart,
"//", 2))
2427 linetext = linestart;
2429 for (
i = 0;
i < limit;
i++)
2431 if (linetext >= lineend)
2435 mins[
i] = atof(linetext);
2437 maxs[
i - 3] = atof(linetext);
2439 while (linetext < lineend && !
ISWHITESPACE(*linetext) && *linetext !=
',')
2442 if (linetext < lineend)
2444 if (*linetext ==
',')
2461 if (linetext >= lineend || *linetext !=
'"')
2465 len =
min(lineend - linetext, (
int)
sizeof(
name) - 1);
2466 memcpy(
name, linetext, len);
2478 for (len = 0;len < (
int)
sizeof(
name) - 1 && linetext < lineend;)
2480 if (*linetext ==
'$')
2482 if (linetext + 18 <= lineend && !strncmp(linetext,
"$loc_name_separator", 19)) {s =
" ";linetext += 19;}
2483 else if (linetext + 13 <= lineend && !strncmp(linetext,
"$loc_name_ssg", 13)) {s =
"SSG";linetext += 13;}
2484 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_ng", 12)) {s =
"NG";linetext += 12;}
2485 else if (linetext + 13 <= lineend && !strncmp(linetext,
"$loc_name_sng", 13)) {s =
"SNG";linetext += 13;}
2486 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_gl", 12)) {s =
"GL";linetext += 12;}
2487 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_rl", 12)) {s =
"RL";linetext += 12;}
2488 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_lg", 12)) {s =
"LG";linetext += 12;}
2489 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_ga", 12)) {s =
"GA";linetext += 12;}
2490 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_ya", 12)) {s =
"YA";linetext += 12;}
2491 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_ra", 12)) {s =
"RA";linetext += 12;}
2492 else if (linetext + 12 <= lineend && !strncmp(linetext,
"$loc_name_mh", 12)) {s =
"MEGA";linetext += 12;}
2496 while (len < (
int)
sizeof(
name) - 1 && *s)
2501 name[len++] = *linetext++;
2644 float shadingorigin[3],
a[3], c[3],
dir[3];
2647 for (q = 0; q < 3; q++)
2648 a[q] = c[q] =
dir[q] = 0;
2661 for (q = 0; q < 3; q++)
2668 for (recursion = 32; recursion > 0; --recursion)
2695 for (q = 0; q < 3; q++)
2705 for (q = 0; q < 3; q++)
2716 for (q = 0; q < 3; q++)
2745 for (q = 0; q < 3; q++)
2762 for (q = 0; q < 3; q++)
2765 for (q = 0; q < 3; q++)
2804 static double clframetime;
2805 static double cl_timer = 0;
2806 static double time1 = 0, time2 = 0, time3 = 0;
2807 int pass1, pass2, pass3;
2819 cl_timer =
min(cl_timer +
time, 0.1);
2830#ifdef CONFIG_VIDEO_CAPTURE
2832 if (
cls.capturevideo.active)
2834 if (
cls.capturevideo.realtime)
2838 clframetime = 1.0 /
cls.capturevideo.framerate;
2934 pass1 = (
int)((time1 - time3)*1000000);
2936 pass2 = (
int)((time2 - time1)*1000000);
2937 pass3 = (
int)((time3 - time2)*1000000);
2938 Con_Printf(
"%6ius total %6ius server %6ius gfx %6ius snd\n",
2939 pass1+pass2+pass3, pass1, pass2, pass3);
2943 return cl_timer >= 0 ? 0 : cl_timer;
3105 Cmd_AddCommand(
CF_CLIENT,
"locs_add",
CL_Locs_Add_f,
"add a point or box location (usage: x y z[ x y z] \"name\", if two sets of xyz are supplied it is a box, otherwise point)");
#define SUPERCONTENTS_SKY
#define SUPERCONTENTS_SOLID
void CDAudio_Update(void)
void CL_InitCommands(void)
trace_t CL_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend, qbool hitnetworkbrushmodels, qbool hitnetworkplayers, int *hitnetworkentity, qbool hitcsqcentities, qbool hitsurfaces)
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_ReadDemoMessage(void)
void CL_StopPlayback(void)
void CL_MeshEntities_Scene_AddRenderEntity(void)
static void CL_Reconnect_f(cmd_state_t *cmd)
void CL_DisconnectEx(qbool kicked, const char *fmt,...)
void CL_UpdateViewEntities(void)
model_t cl_meshentitymodels[NUM_MESHENTITIES]
static void CL_ToggleMenu_Hook(void)
cvar_t cl_explosions_lifetime
double CL_Frame(double time)
static void CL_RelinkStaticEntities(void)
cvar_t cl_minfps_qualitystepmax
void CL_MeshEntities_Scene_FinalizeRenderEntity(void)
static void CL_PrintEntities_f(cmd_state_t *cmd)
void CL_UpdateWorld(void)
cvar_t cl_minfps_qualitymin
cvar_t cl_autodemo_delete
static void CL_UpdateEntityShading_GetDirectedFullbright(vec3_t ambient, vec3_t diffuse, vec3_t worldspacenormal)
void CL_UpdateRenderEntity(entity_render_t *ent)
cvar_t r_overheadsprites_pushback
void CL_Beam_CalculatePositions(const beam_t *b, vec3_t start, vec3_t end)
static void CL_TimeRefresh_f(cmd_state_t *cmd)
cvar_t r_fullbright_directed_pitch_relative
cvar_t cl_prydoncursor_notrace
void CSQC_RelinkAllEntities(int drawmask)
static void CL_RelinkWorld(void)
cvar_t r_fullbright_directed_diffuse
static void CL_LerpPlayer(float frac)
void CL_Disconnect_f(cmd_state_t *cmd)
cvar_t cl_stainmaps_clearonload
cvar_t cl_dlights_decaybrightness
static float CL_LerpPoint(void)
static const vec3_t muzzleflashorigin
static void CL_AddQWCTFFlagModel(entity_t *player, int skin)
void CL_Effect(vec3_t org, model_t *model, int startframe, int framecount, float framerate)
cvar_t cl_minfps_qualitymax
void CL_ClearTempEntities(void)
static void CL_UpdateViewModel(void)
void CL_Locs_FindLocationName(char *buffer, size_t buffersize, vec3_t point)
entity_render_t * CL_NewTempEntity(double shadertime)
static void CL_AreaStats_f(cmd_state_t *cmd)
cvar_t cl_explosions_size_start
cvar_t cl_lerpanim_maxdelta_server
void CL_ExpandCSQCRenderEntities(int num)
static void CL_Fog_f(cmd_state_t *cmd)
static void CL_UpdateNetworkCollisionEntities(void)
void CL_RelinkBeams(void)
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)
static void CL_UpdateNetworkEntities(void)
static void CL_LinkNetworkEntity(entity_t *e)
cvar_t cl_explosions_size_end
static void CL_Locs_AddNode(vec3_t mins, vec3_t maxs, const char *name)
cvar_t cl_gameplayfix_nudgeoutofsolid_separation
static void CL_Locs_FreeNode(cl_locnode_t *node)
static void CL_Connect_f(cmd_state_t *cmd)
static void CL_MeshEntities_Start(void)
cl_locnode_t * CL_Locs_FindNearest(const vec3_t point)
matrix4x4_t viewmodelmatrix_withbob
matrix4x4_t viewmodelmatrix_nobob
cvar_t r_fullbright_directed
static void CL_ModelIndexList_f(cmd_state_t *cmd)
cvar_t csqc_polygons_defaultmaterial_nocullface
static void CL_RelinkNetworkEntities(void)
void CL_EstablishConnection(const char *address, int firstarg)
cvar_t r_fullbright_directed_ambient
static void CL_DecayLightFlashes(void)
cvar_t r_fullbright_directed_pitch
void CL_RelinkLightFlashes(void)
static void CL_Locs_Save_f(cmd_state_t *cmd)
static void CL_EstablishConnection_Local(void)
cvar_t cl_beams_instantaimhack
void CL_Locs_Reload_f(cmd_state_t *cmd)
static void CL_RelinkEffects(void)
cvar_t cl_autodemo_nameformat
cvar_t cl_deathnoviewmodel
void CL_SetInfo(const char *key, const char *value, qbool send, qbool allowstarkey, qbool allowmodel, qbool quiet)
static void CL_MeshEntities_Restart(void)
static void CL_UpdateEntityShading_Entity(entity_render_t *ent)
static void CL_MeshEntities_Shutdown(void)
void CL_SetEntityColormapColors(entity_render_t *ent, int colormap)
cvar_t cl_explosions_alpha_start
const char * cl_meshentitynames[NUM_MESHENTITIES]
cvar_t cl_lerpanim_maxdelta_framegroups
static void CL_SoundIndexList_f(cmd_state_t *cmd)
cvar_t cl_maxfps_alwayssleep
static void CL_RelinkQWNails(void)
cvar_t cl_beams_lightatend
void CL_UpdateEntityShading(void)
static void CL_UpdateNetworkEntityTrail(entity_t *e)
cvar_t cl_dlights_decayradius
void CL_MeshEntities_Scene_Clear(void)
cvar_t cl_explosions_alpha_end
void CL_ExpandEntities(int num)
void CL_MeshEntities_Init(void)
static void CL_Locs_Clear_f(cmd_state_t *cmd)
static void CL_Locs_Add_f(cmd_state_t *cmd)
cvar_t cl_beams_quakepositionhack
entity_t cl_meshentities[NUM_MESHENTITIES]
cvar_t r_hdr_glowintensity
uint8_t serverlist_querystage
bitfield because in theory we could be doing QW & DP simultaneously
cvar_t cl_minfps_qualityhysteresis
static void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qbool interpolate)
static void CL_Fog_HeightTexture_f(cmd_state_t *cmd)
cvar_t cl_minfps_qualitymultiply
cvar_t cl_areagrid_link_SOLID_NOT
static void CL_Locs_RemoveNearest_f(cmd_state_t *cmd)
void CL_Parse_Shutdown(void)
void CL_Parse_ErrorCleanUp(void)
cvar_t cl_nettimesyncboundmode
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_Particles_Init(void)
void CL_Particles_Shutdown(void)
void CL_EntityParticles(const entity_t *ent)
void CL_Screen_NewMap(void)
void SCR_BeginLoadingPlaque(qbool startup)
void CL_Screen_Init(void)
void CL_UpdateScreen(void)
void SCR_ClearLoadingScreen(qbool redraw)
void CL_Screen_Shutdown(void)
char cl_connect_status[MAX_QPATH]
User-friendly connection status for the menu and/or loading screen, colours and not supported.
void CL_Video_Shutdown(void)
void CL_Video_Frame(void)
#define LIGHTFLAG_NORMALMODE
#define LIGHTFLAG_REALTIMEMODE
void CL_Beam_AddPolygons(const beam_t *b)
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...
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
#define CF_SERVER
cvar/command that only the server can change/execute
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_NewFrame(void)
cvar_t collision_extendmovelength
#define IS_NEXUIZ_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.
void MSG_WriteString(sizebuf_t *sb, const char *s)
void MSG_WriteByte(sizebuf_t *sb, int c)
void MSG_WriteChar(sizebuf_t *sb, int c)
int dpvsnprintf(char *buffer, size_t buffersize, const char *format, va_list args)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
char * va(char *buf, size_t buflen, const char *format,...)
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_DARKPLACES8
added parting messages. WIP
@ PROTOCOL_NEHAHRAMOVIE
Nehahra movie protocol, a big nasty hack dating back to early days of the Quake Standards Group (but ...
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
#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_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
void CL_VM_PreventInformationLeaks(void)
void CL_VM_ShutDown(void)
#define ENTMASK_ENGINEVIEWMODELS
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.
void Cvar_Callback(cvar_t *var)
char engineversion[128]
version string for the corner of the console, crash messages, status command, etc
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
int FS_Close(qfile_t *file)
int FS_Printf(qfile_t *file, const char *format,...)
void R_DecalSystem_Reset(decalsystem_t *decalsystem)
GLfloat GLfloat GLfloat v2
GLsizei const GLfloat * value
GLenum GLuint GLenum GLsizei const GLchar * buf
void Host_Error(const char *error,...)
int LHNETADDRESS_FromString(lhnetaddress_t *vaddress, const char *string, int defaultport)
void Curl_Clear_forthismap(void)
void AnglesFromVectors(vec3_t angles, const vec3_t forward, const vec3_t up, qbool flippitch)
LadyHavoc: calculates pitch/yaw/roll angles from forward and up vectors.
float VectorNormalizeLength(vec3_t v)
returns vector length
void AngleVectors(const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
#define VectorLerp(v1, lerp, v2, out)
#define VectorNegate(a, b)
#define VectorNormalize(v)
#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 VectorDistance2(a, b)
#define VectorSubtract(a, b, out)
#define VectorCompare(a, b)
#define VectorCopy(in, out)
#define VectorScale(in, scale, out)
#define VectorMAM(scale1, b1, scale2, b2, out)
#define VectorMA(a, scale, b, out)
void Matrix4x4_Concat(matrix4x4_t *out, const matrix4x4_t *in1, const matrix4x4_t *in2)
void Matrix4x4_CreateIdentity(matrix4x4_t *out)
void Matrix4x4_Transform(const matrix4x4_t *in, const float v[3], float out[3])
void Matrix4x4_Transform3x3(const matrix4x4_t *in, const float v[3], float out[3])
void Matrix4x4_CreateFromQuakeEntity(matrix4x4_t *out, double x, double y, double z, double pitch, double yaw, double roll, double scale)
void Matrix4x4_SetOrigin(matrix4x4_t *out, double x, double y, double z)
void Matrix4x4_Invert_Simple(matrix4x4_t *out, const matrix4x4_t *in1)
double Matrix4x4_ScaleFromMatrix(const matrix4x4_t *in)
void Matrix4x4_Normalize(matrix4x4_t *out, matrix4x4_t *in1)
const matrix4x4_t identitymatrix
void Matrix4x4_Scale(matrix4x4_t *out, double rotatescale, double originscale)
void Matrix4x4_OriginFromMatrix(const matrix4x4_t *in, float *out)
int Mod_Alias_GetTagMatrix(const model_t *model, const frameblend_t *frameblend, const skeleton_t *skeleton, int tagindex, matrix4x4_t *outmatrix)
cvar_t mod_q3bsp_lightgrid_world_surfaces
cvar_t mod_q3bsp_lightgrid_texture
cvar_t mod_q3bsp_lightgrid_bsp_surfaces
#define MATERIALFLAG_FULLBRIGHT
void Mod_Mesh_Create(model_t *mod, const char *name)
void Mod_Mesh_Reset(model_t *mod)
void Mod_Mesh_Destroy(model_t *mod)
void Mod_Mesh_Finalize(model_t *mod)
lhnetsocket_t * NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address)
void NetConn_UpdateSockets(void)
void NetConn_ClientFrame(void)
void NetConn_Close(netconn_t *conn)
int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qbool quakesignon_suppressreliables)
unsigned char palette_rgb_pantscolormap[16][3]
unsigned char palette_rgb[256][3]
unsigned char palette_rgb_shirtcolormap[16][3]
void VM_FrameBlendFromFrameGroupBlend(struct frameblend_s *frameblend, const struct framegroupblend_s *framegroupblend, const struct model_s *model, double curtime)
entity_state_t defaultstate
#define RENDER_EXTERIORMODEL
#define EF_DYNAMICMODELLIGHT
#define RENDER_COMPLEXANIMATION
#define RENDER_DYNAMICMODELLIGHT
#define PFLAGS_FULLDYNAMIC
#define RENDER_COLORMAPPED
#define RENDER_DOUBLESIDED
#define RENDER_NOSELFSHADOW
#define RENDER_CUSTOMIZEDMODELLIGHT
#define RENDER_NODEPTHTEST
#define MAX_PARTICLES_INITIAL
initial allocation for cl.particles
#define MAX_EFFECTS
limit on size of cl.effects
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
#define MAX_EDICTS
max number of objects in game world at once (32768 protocol limit)
#define MAX_STATICENTITIES
limit on size of cl.static_entities
#define MAX_LIGHTSTYLES
max flickering light styles in level (note: affects savegame format)
#define MAX_BEAMS
limit on size of cl.beams
#define MAX_DLIGHTS
max number of dynamic lights (rocket flashes, etc) in scene at once
#define MAX_ENTITIES_INITIAL
initial size of cl.entities
#define MAX_SOUNDS
max number of sounds loaded at once
#define MAX_QPATH
max length of a quake game pathname
#define MAX_TEMPENTITIES
max number of temporary models visible per frame (certain sprite effects, certain types of CSQC entit...
#define MAX_MODELS
max number of models loaded at once (including during level transitions)
#define STAT_ITEMS
FTE, DP.
void R_Modules_Shutdown(void)
void R_RegisterModule(const char *name, void(*start)(void), void(*shutdown)(void), void(*newmap)(void), void(*devicelost)(void), void(*devicerestored)(void))
void R_Modules_Init(void)
void R_RTLight_Update(rtlight_t *rtlight, int isstatic, matrix4x4_t *matrix, vec3_t color, int style, const char *cubemapname, int shadow, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags)
void R_CompleteLightPoint(float *ambient, float *diffuse, float *lightdir, const vec3_t p, const int flags, float lightmapintensity, float ambientintensity)
void R_TimeReport(const char *desc)
void S_StopAllSounds(void)
void S_Update(const matrix4x4_t *listenermatrix)
struct cl_locnode_s * next
lightstyle_t * lightstyle
int parsingtextexpectingpingforscores
unsigned short csqc_server2csqcentitynumber[MAX_EDICTS]
qbool csqc_usecsqclistener
int num_brushmodel_entities
unsigned char * entities_active
int max_csqcrenderentities
int max_brushmodel_entities
struct sfx_s * sound_precache[MAX_SOUNDS]
cshift_t cshifts[NUM_CSHIFTS]
int * brushmodel_entities
char worldbasename[MAX_QPATH]
struct model_s * worldmodel
entity_render_t * csqcrenderentities
entity_t * static_entities
unsigned int qw_deltasequence[QW_UPDATE_BACKUP]
csqc_vidvars_t csqc_vidvars
matrix4x4_t csqc_listenermatrix
char worldnamenoextension[MAX_QPATH]
char connect_userinfo[MAX_USERINFO_STRING]
mempool_t * permanentmempool
int connect_remainingtries
unsigned char * qw_downloadmemory
double connect_nextsendtime
lhnetaddress_t connect_address
lhnetsocket_t * connect_mysocket
protocolversion_t protocol
char userinfo[MAX_USERINFO_STRING]
command interpreter state - the tokenizing and execution of commands, as well as pointers to which cv...
struct entity_render_s * ent
frameblend_t frameblend[MAX_FRAMEBLENDS]
vec3_t custommodellight_lightdir
float render_fullbright[3]
float render_rtlight_diffuse[3]
matrix4x4_t inversematrix
float custommodellight_origin[3]
float render_modellight_specular[3]
qbool render_rtlight_disabled
float render_modellight_lightdir_world[3]
float render_lightmap_ambient[3]
vec3_t custommodellight_diffuse
decalsystem_t decalsystem
float render_modellight_lightdir_local[3]
vec3_t colormap_shirtcolor
qbool render_modellight_forced
framegroupblend_t framegroupblend[MAX_FRAMEGROUPBLENDS]
vec3_t custommodellight_ambient
float render_lightmap_diffuse[3]
float render_modellight_ambient[3]
float render_rtlight_specular[3]
float render_lightmap_specular[3]
float render_modellight_diffuse[3]
vec3_t colormap_pantscolor
framegroupblend_t framegroupblend[4]
unsigned short modelindex
unsigned char colormod[3]
unsigned short traileffectnum
skeleton_t skeletonobject
unsigned char lightpflags
entity_state_t state_baseline
entity_persistent_t persistent
entity_state_t state_current
entity_state_t state_previous
qbool restless
don't sleep
void(* SV_Shutdown)(void)
void(* ConnectLocal)(void)
struct host_static_t::@12 hook
qbool paused
global paused state, pauses both client and server
void(* Disconnect)(qbool, const char *,...)
char map[MAX_STYLESTRING]
void(* LightPoint)(struct model_s *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal)
rtexture_t * lightgridtexture
void(* TraceBox)(struct model_s *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, struct trace_s *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask)
texture_t * data_textures
sizebuf_t message
writing buffer to send to peer as the next reliable message can be added to at any time,...
entity_render_t * tempentities
field of temporary entities that is reset each (client) frame
float rtlightstylevalue[MAX_LIGHTSTYLES]
float fraction of base light value
entity_render_t ** entities
renderable entities (excluding world)
model_t * worldmodel
same as worldentity->model
unsigned short lightstylevalue[MAX_LIGHTSTYLES]
8.8 fraction of base light value
entity_render_t * worldentity
the world
rtlight_t templights[MAX_DLIGHTS]
double time
(client gameworld) time for rendering time based effects
rtlight_t * lights[MAX_DLIGHTS]
char fog_height_texturename[64]
float quality
render quality (0 to 1) - affects r_drawparticles_drawdistance and others
const struct model_s * model
struct matrix4x4_s * relativetransforms
size_t Sys_TimeString(char buf[], size_t bufsize, const char *timeformat)
void Sys_Error(const char *error,...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN
Causes the entire program to exit ASAP.
void Sys_AllowProfiling(qbool enable)
double Sys_DirtyTime(void)
double Sys_Sleep(double time)
called to yield for a little bit so as not to hog cpu when paused or debugging
int Sys_CheckParm(const char *parm)
void VID_Shared_Init(void)
void VID_Init(void)
Called at startup.
void VID_Shutdown(void)
Called at shutdown.
void V_FadeViewFlashs(void)
void V_CalcViewBlend(void)
void World_PrintAreaStats(world_t *world, const char *worldname)
#define Mem_FreePool(pool)
#define Mem_Alloc(pool, size)
#define Mem_AllocPool(name, flags, parent)
#define Mem_Realloc(pool, data, size)
#define Mem_EmptyPool(pool)