diff --git a/doc/040_cvarlist.md b/doc/040_cvarlist.md index a834f2ec..2b9a261b 100644 --- a/doc/040_cvarlist.md +++ b/doc/040_cvarlist.md @@ -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 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 `3` for even more informations. diff --git a/src/client/cl_entities.c b/src/client/cl_entities.c index 0a9cdee6..80d390b3 100644 --- a/src/client/cl_entities.c +++ b/src/client/cl_entities.c @@ -445,7 +445,15 @@ CL_AddPacketEntities(frame_t *frame) if (effects & EF_ROCKET) { 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. @@ -470,10 +478,16 @@ CL_AddPacketEntities(frame_t *frame) { V_AddLight(ent.origin, 200, 0, 1, 0); } - else { - V_AddLight(ent.origin, 200, 1, 1, 0); + if (cl_r1q2_lightstyle->value) + { + V_AddLight(ent.origin, 200, 1, 1, 0); + } + else + { + V_AddLight(ent.origin, 200, 1, 1, 1); + } } } else if (effects & EF_GIB) diff --git a/src/client/cl_main.c b/src/client/cl_main.c index c02bd929..077deb9f 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -58,6 +58,7 @@ cvar_t *cl_paused; cvar_t *cl_loadpaused; cvar_t *cl_lightlevel; +cvar_t *cl_r1q2_lightstyle; /* userinfo */ cvar_t *name; @@ -524,6 +525,7 @@ CL_InitLocal(void) rcon_address = Cvar_Get("rcon_address", "", 0); cl_lightlevel = Cvar_Get("r_lightlevel", "0", 0); + cl_r1q2_lightstyle = Cvar_Get("cl_r1q2_lightstyle", "1", CVAR_ARCHIVE); /* userinfo */ name = Cvar_Get("name", "unnamed", CVAR_USERINFO | CVAR_ARCHIVE); diff --git a/src/client/header/client.h b/src/client/header/client.h index 3ebfaefd..666952ff 100644 --- a/src/client/header/client.h +++ b/src/client/header/client.h @@ -315,6 +315,7 @@ extern cvar_t *horplus; extern cvar_t *cin_force43; extern cvar_t *vid_fullscreen; extern cvar_t *cl_anglekicks; +extern cvar_t *cl_r1q2_lightstyle; typedef struct {