- only activate lights if the light actor isn't dormant, and only create a new one if it doesn't already have one.

-
This commit is contained in:
Christoph Oelckers 2019-01-31 09:01:02 +01:00 committed by drfrag
parent eebdd6c1bd
commit d513cbf789

View file

@ -867,15 +867,18 @@ void AActor::RecreateAllAttachedLights()
while ((a=it.Next()))
{
if (a->IsKindOf(NAME_DynamicLight))
{
::AttachLight(a);
::ActivateLight(a);
}
else
if (!a->IsKindOf(NAME_DynamicLight))
{
a->SetDynamicLights();
}
else if (a->AttachedLights.Size() == 0)
{
::AttachLight(a);
if (!(a->flags2 & MF2_DORMANT))
{
::ActivateLight(a);
}
}
}
}