Removed gl_lights_checkside which essentially was just a pointless piece of cruft inherited from ZDoomGL.

This commit is contained in:
Christoph Oelckers 2018-04-16 08:45:50 +02:00
parent f57c804a5a
commit 8a2e52d651
5 changed files with 6 additions and 8 deletions

View file

@ -438,7 +438,7 @@ bool gl_SetupLight(int group, Plane & p, ADynamicLight * light, FVector3 & nearP
if (radius <= 0.f) return false;
if (dist > radius) return false;
if (checkside && gl_lights_checkside && p.PointOnSide(lpos.X, lpos.Z, lpos.Y))
if (checkside && p.PointOnSide(lpos.X, lpos.Z, lpos.Y))
{
return false;
}
@ -666,7 +666,7 @@ void GLFlat::DrawSubsectorLights(subsector_t * sub, int pass)
// we must do the side check here because gl_SetupLight needs the correct plane orientation
// which we don't have for Legacy-style 3D-floors
double planeh = plane.plane.ZatPoint(light);
if (gl_lights_checkside && ((planeh<light->Z() && ceiling) || (planeh>light->Z() && !ceiling)))
if (((planeh<light->Z() && ceiling) || (planeh>light->Z() && !ceiling)))
{
node = node->nextLight;
continue;

View file

@ -49,7 +49,6 @@
//
//==========================================================================
CVAR (Bool, gl_lights_checkside, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
CVAR (Bool, gl_light_sprites, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
CVAR (Bool, gl_light_particles, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
@ -69,7 +68,7 @@ bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, FD
if (radius <= 0.f) return false;
if (dist > radius) return false;
if (checkside && gl_lights_checkside && p.PointOnSide(pos.X, pos.Z, pos.Y))
if (checkside && p.PointOnSide(pos.X, pos.Z, pos.Y))
{
return false;
}

View file

@ -133,7 +133,7 @@ void GLFlat::SetupSubsectorLights(int pass, subsector_t * sub, int *dli)
// we must do the side check here because gl_SetupLight needs the correct plane orientation
// which we don't have for Legacy-style 3D-floors
double planeh = plane.plane.ZatPoint(light);
if (gl_lights_checkside && ((planeh<light->Z() && ceiling) || (planeh>light->Z() && !ceiling)))
if ((planeh<light->Z() && ceiling) || (planeh>light->Z() && !ceiling))
{
node = node->nextLight;
continue;

View file

@ -23,7 +23,7 @@ EXTERN_CVAR(Int, gl_weaponlight)
EXTERN_CVAR (Bool, gl_lights);
EXTERN_CVAR (Bool, gl_attachedlights);
EXTERN_CVAR (Bool, gl_lights_checkside);
EXTERN_CVAR (Bool, gl_light_sprites);
EXTERN_CVAR (Bool, gl_light_particles);
EXTERN_CVAR (Bool, gl_light_shadowmap);

View file

@ -2193,7 +2193,6 @@ OptionMenu "GLLightOptions" protected
Option "$TCMNU_DYNLIGHTS", "r_dynlights", "OnOff"
Option "$GLLIGHTMNU_LIGHTSENABLED", gl_lights, "OnOff"
Option "$GLLIGHTMNU_LIGHTDEFS", gl_attachedlights, "YesNo"
Option "$GLLIGHTMNU_CLIPLIGHTS", gl_lights_checkside, "YesNo"
Option "$GLLIGHTMNU_LIGHTSPRITES", gl_light_sprites, "YesNo"
Option "$GLLIGHTMNU_LIGHTPARTICLES", gl_light_particles, "YesNo"
Option "$GLLIGHTMNU_LIGHTSHADOWMAP", gl_light_shadowmap, "YesNo"