mirror of https://github.com/ZDoom/gzdoom-gles.git
- 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:
parent
a2065cae4b
commit
7b7334e245
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue