Add cl_r1q2_lighstyle, set to 0 for Vanilla Q2 dlight colors.

Since the first release Yamagi Quake II used the more fanzy R1Q2 colors
for some dynamic lights:

* In R1Q2 the rocket has orange light, matching the color of the fire
  trail and the generic explosion. Vanilla Quake II had yellow light,
  the same as the blaster and several muzzle flashs.
* In R1Q2 hyperblaster projectiles are emitting yellow light, like the
  normal blaster. That matches the projectile colors, the muzzle flash
  and the effect when hitting a wall. And it's more logical, since the
  hyperblaster is just a blaster on steroids. Vanilla Quake II had white
  / uncolored lights.

Add an option to revert to Vanilla Quake II colors, leave the R1Q2
colors as default. Closes #640.
This commit is contained in:
Yamagi 2021-01-10 18:30:49 +01:00
parent 7163d133cb
commit a98d533ae1
4 changed files with 25 additions and 3 deletions

View file

@ -81,6 +81,11 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable`
loading. If set to `0` pause mode is never entered, this is the loading. If set to `0` pause mode is never entered, this is the
Vanilla Quake II behaviour. Vanilla Quake II behaviour.
* **cl_r1q2_lightstyle**: Since the first release Yamagi Quake II used
the R1Q2 colors for the dynamic lights of rockets and hyperblaster
projectiles. Set to `0` to get the Vanilla Quake II colors. Defaults
to `1`.
* **cl_showfps**: Shows the framecounter. Set to `2` for more and to * **cl_showfps**: Shows the framecounter. Set to `2` for more and to
`3` for even more informations. `3` for even more informations.

View file

@ -445,7 +445,15 @@ CL_AddPacketEntities(frame_t *frame)
if (effects & EF_ROCKET) if (effects & EF_ROCKET)
{ {
CL_RocketTrail(cent->lerp_origin, ent.origin, cent); CL_RocketTrail(cent->lerp_origin, ent.origin, cent);
V_AddLight(ent.origin, 200, 1, 0.25f, 0);
if (cl_r1q2_lightstyle->value)
{
V_AddLight(ent.origin, 200, 1, 0.23f, 0);
}
else
{
V_AddLight(ent.origin, 200, 1, 1, 0);
}
} }
/* Do not reorder EF_BLASTER and EF_HYPERBLASTER. /* Do not reorder EF_BLASTER and EF_HYPERBLASTER.
@ -470,11 +478,17 @@ CL_AddPacketEntities(frame_t *frame)
{ {
V_AddLight(ent.origin, 200, 0, 1, 0); V_AddLight(ent.origin, 200, 0, 1, 0);
} }
else else
{
if (cl_r1q2_lightstyle->value)
{ {
V_AddLight(ent.origin, 200, 1, 1, 0); V_AddLight(ent.origin, 200, 1, 1, 0);
} }
else
{
V_AddLight(ent.origin, 200, 1, 1, 1);
}
}
} }
else if (effects & EF_GIB) else if (effects & EF_GIB)
{ {

View file

@ -58,6 +58,7 @@ cvar_t *cl_paused;
cvar_t *cl_loadpaused; cvar_t *cl_loadpaused;
cvar_t *cl_lightlevel; cvar_t *cl_lightlevel;
cvar_t *cl_r1q2_lightstyle;
/* userinfo */ /* userinfo */
cvar_t *name; cvar_t *name;
@ -524,6 +525,7 @@ CL_InitLocal(void)
rcon_address = Cvar_Get("rcon_address", "", 0); rcon_address = Cvar_Get("rcon_address", "", 0);
cl_lightlevel = Cvar_Get("r_lightlevel", "0", 0); cl_lightlevel = Cvar_Get("r_lightlevel", "0", 0);
cl_r1q2_lightstyle = Cvar_Get("cl_r1q2_lightstyle", "1", CVAR_ARCHIVE);
/* userinfo */ /* userinfo */
name = Cvar_Get("name", "unnamed", CVAR_USERINFO | CVAR_ARCHIVE); name = Cvar_Get("name", "unnamed", CVAR_USERINFO | CVAR_ARCHIVE);

View file

@ -315,6 +315,7 @@ extern cvar_t *horplus;
extern cvar_t *cin_force43; extern cvar_t *cin_force43;
extern cvar_t *vid_fullscreen; extern cvar_t *vid_fullscreen;
extern cvar_t *cl_anglekicks; extern cvar_t *cl_anglekicks;
extern cvar_t *cl_r1q2_lightstyle;
typedef struct typedef struct
{ {