mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- 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
1 changed files with 9 additions and 6 deletions
|
@ -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 a new issue