cvar_t cl_locs_enable = {CVAR_SAVE, "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)"};
cvar_t cl_locs_show = {0, "locs_show", "0", "shows defined locations for editing purposes"};
-extern cvar_t r_equalize_entities_fullbright;
-
client_static_t cls;
client_state_t cl;
cl.decals = (decal_t *) Mem_Alloc(cls.levelmempool, cl.max_decals * sizeof(decal_t));
cl.showlmps = NULL;
- // LordHavoc: have to set up the baseline info for alpha and other stuff
+ // LadyHavoc: have to set up the baseline info for alpha and other stuff
for (i = 0;i < cl.max_entities;i++)
{
cl.entities[i].state_baseline = defaultstate;
if (cl_nettimesyncboundmode.integer == 1)
cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
- // LordHavoc: lerp in listen games as the server is being capped below the client (usually)
+ // LadyHavoc: lerp in listen games as the server is being capped below the client (usually)
if (cl.mtime[0] <= cl.mtime[1])
{
cl.time = cl.mtime[0];
{
if (!(e->render.effects & EF_FULLBRIGHT))
e->render.flags |= RENDER_LIGHT;
- else if(r_equalize_entities_fullbright.integer)
- e->render.flags |= RENDER_LIGHT | RENDER_EQUALIZE;
}
// hide player shadow during intermission or nehahra movie
if (!(e->render.effects & (EF_NOSHADOW | EF_ADDITIVE | EF_NODEPTHTEST))
// handle particle trails and such effects now that we know where this
// entity is in the world...
trailtype = EFFECT_NONE;
- // LordHavoc: if the entity has no effects, don't check each
+ // LadyHavoc: if the entity has no effects, don't check each
if (e->render.effects & (EF_BRIGHTFIELD | EF_FLAME | EF_STARDUST))
{
if (e->render.effects & EF_BRIGHTFIELD)
// muzzleflash fades over time
if (e->persistent.muzzleflash > 0)
e->persistent.muzzleflash -= bound(0, cl.time - cl.oldtime, 0.1) * 20;
- // LordHavoc: if the entity has no effects, don't check each
+ // LadyHavoc: if the entity has no effects, don't check each
if (e->render.effects && !(e->render.flags & RENDER_VIEWMODEL))
{
if (e->render.effects & EF_GIB)
trailtype = EFFECT_TR_ROCKET;
else if (e->render.effects & EF_GRENADE)
{
- // LordHavoc: e->render.alpha == -1 is for Nehahra dem compatibility (cigar smoke)
+ // LadyHavoc: e->render.alpha == -1 is for Nehahra dem compatibility (cigar smoke)
trailtype = e->render.alpha == -1 ? EFFECT_TR_NEHAHRASMOKE : EFFECT_TR_GRENADE;
}
else if (e->render.effects & EF_TRACER3)
dlightcolor[0] = 0;
dlightcolor[1] = 0;
dlightcolor[2] = 0;
- // LordHavoc: if the entity has no effects, don't check each
+ // LadyHavoc: if the entity has no effects, don't check each
if (e->render.effects & (EF_BRIGHTFIELD | EF_DIMLIGHT | EF_BRIGHTLIGHT | EF_RED | EF_BLUE | EF_FLAME | EF_STARDUST))
{
if (e->render.effects & EF_BRIGHTFIELD)
dlightcolor[1] += 3.00f;
dlightcolor[2] += 3.00f;
}
- // LordHavoc: more effects
+ // LadyHavoc: more effects
if (e->render.effects & EF_RED) // red
{
dlightradius = max(dlightradius, 200);
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);
r_refdef.scene.lights[r_refdef.scene.numlights] = &r_refdef.scene.templights[r_refdef.scene.numlights];r_refdef.scene.numlights++;
}
- // LordHavoc: if the model has no flags, don't check each
+ // LadyHavoc: if the model has no flags, don't check each
if (e->render.model && e->render.effects && !(e->render.flags & RENDER_VIEWMODEL))
{
if (e->render.effects & EF_GIB)
trailtype = EFFECT_TR_ROCKET;
else if (e->render.effects & EF_GRENADE)
{
- // LordHavoc: e->render.alpha == -1 is for Nehahra dem compatibility (cigar smoke)
+ // LadyHavoc: e->render.alpha == -1 is for Nehahra dem compatibility (cigar smoke)
trailtype = e->render.alpha == -1 ? EFFECT_TR_NEHAHRASMOKE : EFFECT_TR_GRENADE;
}
else if (e->render.effects & EF_TRACER3)
trailtype = EFFECT_TR_VORESPIKE;
}
- // LordHavoc: customizable glow
+ // LadyHavoc: customizable glow
if (e->state_current.glowsize)
{
// * 4 for the expansion from 0-255 to 0-1023 range,
{
if (!(e->render.effects & EF_FULLBRIGHT))
e->render.flags |= RENDER_LIGHT;
- else if(r_equalize_entities_fullbright.integer)
- e->render.flags |= RENDER_LIGHT | RENDER_EQUALIZE;
}
// hide player shadow during intermission or nehahra movie
if (!(e->render.effects & (EF_NOSHADOW | EF_ADDITIVE | EF_NODEPTHTEST)) && (e->render.alpha >= 1))
{
if (cl_beams_quakepositionhack.integer && !chase_active.integer)
{
- // LordHavoc: this is a stupid hack from Quake that makes your
+ // LadyHavoc: this is a stupid hack from Quake that makes your
// lightning appear to come from your waist and cover less of your
// view
// in Quake this hack was applied to all players (causing the
{
vec3_t dir, localend;
vec_t len;
- // LordHavoc: this updates the beam direction to match your
+ // LadyHavoc: this updates the beam direction to match your
// viewangles
VectorSubtract(end, start, dir);
len = VectorLength(dir);
r_refdef.scene.time = cl.time;
}
-// LordHavoc: pausedemo command
+// LadyHavoc: pausedemo command
static void CL_PauseDemo_f (void)
{
cls.demopaused = !cls.demopaused;
CL_Locs_Clear_f();
- // try maps/something.loc first (LordHavoc: where I think they should be)
+ // try maps/something.loc first (LadyHavoc: where I think they should be)
dpsnprintf(locfilename, sizeof(locfilename), "%s.loc", cl.worldnamenoextension);
filedata = (char *)FS_LoadFile(locfilename, cls.levelmempool, false, &filesize);
if (!filedata)
{
- // try proquake name as well (LordHavoc: I hate path mangling)
+ // try proquake name as well (LadyHavoc: I hate path mangling)
dpsnprintf(locfilename, sizeof(locfilename), "locs/%s.loc", cl.worldbasename);
filedata = (char *)FS_LoadFile(locfilename, cls.levelmempool, false, &filesize);
if (!filedata)
extern cvar_t r_fullbright_directed_ambient;
extern cvar_t r_fullbright_directed_diffuse;
extern cvar_t r_fullbright_directed;
-extern cvar_t r_equalize_entities_minambient;
-extern cvar_t r_equalize_entities_to;
-extern cvar_t r_equalize_entities_by;
extern cvar_t r_hdr_glowintensity;
static void CL_UpdateEntityShading_GetDirectedFullbright(vec3_t ambient, vec3_t diffuse, vec3_t worldspacenormal)
static void CL_UpdateEntityShading_Entity(entity_render_t *ent)
{
- float shadingorigin[3], f, fa, fd, fdd, a[3], c[3], dir[3];
+ float shadingorigin[3], a[3], c[3], dir[3];
int q;
for (q = 0; q < 3; q++)
CL_UpdateEntityShading_GetDirectedFullbright(a, c, dir);
else
R_CompleteLightPoint(a, c, dir, shadingorigin, LP_LIGHTMAP, r_refdef.scene.lightmapintensity, r_refdef.scene.ambientintensity);
-
- if (ent->flags & RENDER_EQUALIZE)
- {
- // first fix up ambient lighting...
- if (r_equalize_entities_minambient.value > 0)
- {
- fd = 0.299f * ent->render_modellight_diffuse[0] + 0.587f * ent->render_modellight_diffuse[1] + 0.114f * ent->render_modellight_diffuse[2];
- if (fd > 0)
- {
- fa = (0.299f * ent->render_modellight_ambient[0] + 0.587f * ent->render_modellight_ambient[1] + 0.114f * ent->render_modellight_ambient[2]);
- if (fa < r_equalize_entities_minambient.value * fd)
- {
- // solve:
- // fa'/fd' = minambient
- // fa'+0.25*fd' = fa+0.25*fd
- // ...
- // fa' = fd' * minambient
- // fd'*(0.25+minambient) = fa+0.25*fd
- // ...
- // fd' = (fa+0.25*fd) * 1 / (0.25+minambient)
- // fa' = (fa+0.25*fd) * minambient / (0.25+minambient)
- // ...
- fdd = (fa + 0.25f * fd) / (0.25f + r_equalize_entities_minambient.value);
- f = fdd / fd; // f>0 because all this is additive; f<1 because fdd<fd because this follows from fa < r_equalize_entities_minambient.value * fd
- for (q = 0; q < 3; q++)
- {
- a[q] = (1 - f)*0.25f * c[q];
- c[q] *= f;
- }
- }
- }
- }
-
- if (r_equalize_entities_to.value > 0 && r_equalize_entities_by.value != 0)
- {
- fa = 0.299f * a[0] + 0.587f * a[1] + 0.114f * a[2];
- fd = 0.299f * c[0] + 0.587f * c[1] + 0.114f * c[2];
- f = fa + 0.25 * fd;
- if (f > 0)
- {
- // adjust brightness and saturation to target
- float l2 = r_equalize_entities_by.value, l1 = 1 - l2;
- for (q = 0; q < 3; q++)
- {
- a[q] = l1 * a[q] + l2 * (fa / f);
- c[q] = l1 * c[q] + l2 * (fd / f);
- }
- }
- }
- }
}
for (q = 0; q < 3; q++)
Cmd_AddCommand ("fog", CL_Fog_f, "set global fog parameters (density red green blue [alpha [mindist [maxdist [top [fadedepth]]]]])");
Cmd_AddCommand ("fog_heighttexture", CL_Fog_HeightTexture_f, "set global fog parameters (density red green blue alpha mindist maxdist top depth textures/mapname/fogheight.tga)");
- // LordHavoc: added pausedemo
+ // LadyHavoc: added pausedemo
Cmd_AddCommand ("pausedemo", CL_PauseDemo_f, "pause demo playback (can also safely pause demo recording if using QUAKE, QUAKEDP or NEHAHRAMOVIE protocol, useful for making movies)");
Cmd_AddCommand ("cl_areastats", CL_AreaStats_f, "prints statistics on entity culling during collision traces");