mirror of
https://github.com/blendogames/thirtyflightsofloving.git
synced 2024-11-15 00:41:21 +00:00
Added r_entity_doublelight cvar to renderer.
This commit is contained in:
parent
fdca639bd4
commit
c137bb8926
4 changed files with 36 additions and 20 deletions
|
@ -66,6 +66,8 @@ Changes as of v0.20 update 8:
|
|||
- Added changeable gl_clear color controlled by cvars r_clearcolor_r, r_clearcolor_g, and r_clearcolor_b.
|
||||
Values are normalized (0-1).
|
||||
|
||||
- Added doubled entity lighting to mimic Q2's original entity lighting. Set the cvar r_entity_doublelight to 1 to enable this.
|
||||
|
||||
- Added ifeq, ifneq, ifgt, ifge, iflt, ifle, ifbit, and ifnbit layout script commands.
|
||||
|
||||
- Added a check to prevent game code from sending unicasts to non-present clients (i.e. bots). This would
|
||||
|
|
|
@ -422,6 +422,11 @@ void R_LightPoint (vec3_t p, vec3_t color, qboolean isEnt)
|
|||
if (add > 0)
|
||||
VectorMA (color, add, dl->color, color);
|
||||
}
|
||||
|
||||
// scale up light color by r_modulate if enabled
|
||||
if (r_entity_doublelight->integer) {
|
||||
VectorScale (color, r_modulate->value, color);
|
||||
}
|
||||
// VectorScale (color, r_modulate->value, color); // Knightmare- this makes ents too bright
|
||||
// VectorScale (color, r_modulate->value*1.5f, color); // Knightmare- this makes ents too bright
|
||||
}
|
||||
|
@ -517,6 +522,11 @@ void R_LightPointDynamics (vec3_t p, vec3_t color, m_dlight_t *list, int *amount
|
|||
}
|
||||
}
|
||||
|
||||
// scale up light color by r_modulate if enabled
|
||||
if (r_entity_doublelight->integer) {
|
||||
VectorScale (color, r_modulate->value, color);
|
||||
}
|
||||
|
||||
*amount = m_dl;
|
||||
}
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ extern cvar_t *r_dlights_normal;
|
|||
extern cvar_t *r_model_shading;
|
||||
extern cvar_t *r_model_dlights;
|
||||
extern cvar_t *r_model_minlight;
|
||||
extern cvar_t *r_entity_doublelight;
|
||||
|
||||
extern cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light level
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ cvar_t *r_dlights_normal; // lerped dlights on models
|
|||
cvar_t *r_model_shading;
|
||||
cvar_t *r_model_dlights;
|
||||
cvar_t *r_model_minlight;
|
||||
cvar_t *r_entity_doublelight;
|
||||
|
||||
cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light level
|
||||
|
||||
|
@ -964,6 +965,8 @@ void R_Register (void)
|
|||
Cvar_SetDescription ("r_model_dlights", "Sets maximum number of dynamic lights for a model.");
|
||||
r_model_minlight = Cvar_Get ("r_model_minlight", "0.02", CVAR_ARCHIVE );
|
||||
Cvar_SetDescription ("r_model_minlight", "Sets minimum light level for alias model rendering.");
|
||||
r_entity_doublelight = Cvar_Get ("r_entity_doublelight", "0", CVAR_ARCHIVE );
|
||||
Cvar_SetDescription ("r_entity_doublelight", "Enables original glitchy double-lighting of models. This is a sort-of-exploit, but is not considered a cheat.");
|
||||
|
||||
r_lightlevel = Cvar_Get ("r_lightlevel", "0", 0);
|
||||
Cvar_SetDescription ("r_lightlevel", "Hack to send player's light level to server. This is overwritten every render frame.");
|
||||
|
|
Loading…
Reference in a new issue