Added "DontLightActors" flag for dynamic lights. Actors will not be illuminated by lights that are given this flag.

This commit is contained in:
nashmuhandes 2017-03-25 14:59:33 +08:00 committed by Christoph Oelckers
commit 99d1581c27
5 changed files with 25 additions and 4 deletions

View file

@ -237,7 +237,7 @@ namespace swrenderer
while (node != nullptr)
{
ADynamicLight *light = node->lightsource;
if (light->visibletoplayer && !(light->flags2&MF2_DORMANT) && (!(light->flags4&MF4_DONTLIGHTSELF) || light->target != thing))
if (light->visibletoplayer && !(light->flags2&MF2_DORMANT) && (!(light->flags4&MF4_DONTLIGHTSELF) || light->target != thing) && !(light->flags4&MF4_DONTLIGHTACTORS))
{
float lx = (float)(light->X() - thing->X());
float ly = (float)(light->Y() - thing->Y());