- 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
parent a2065cae4b
commit 7b7334e245

View file

@ -854,15 +854,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);
}
}
}
}