- make softpoly use the r_dynlights cvar

This commit is contained in:
Magnus Norddahl 2018-06-26 02:19:47 +02:00
parent ff1eb7f3f2
commit f8272287d2
2 changed files with 12 additions and 0 deletions

View File

@ -269,6 +269,12 @@ void RenderPolyPlane::SetLightLevel(PolyRenderThread *thread, PolyDrawArgs &args
void RenderPolyPlane::SetDynLights(PolyRenderThread *thread, PolyDrawArgs &args, subsector_t *sub, bool ceiling)
{
if (!r_dynlights)
{
args.SetLights(nullptr, 0);
return;
}
FLightNode *light_list = sub->lighthead;
auto cameraLight = PolyCameraLight::Instance();

View File

@ -374,6 +374,12 @@ void RenderPolyWall::Render(PolyRenderThread *thread)
void RenderPolyWall::SetDynLights(PolyRenderThread *thread, PolyDrawArgs &args)
{
if (!r_dynlights)
{
args.SetLights(nullptr, 0);
return;
}
FLightNode *light_list = (LineSeg && LineSeg->sidedef) ? LineSeg->sidedef->lighthead : nullptr;
auto cameraLight = PolyCameraLight::Instance();