- fixed the disabled visibility rules check for dynamic lights by doing the actual check in the light's Tick() method and letting the renderer only use the result.

This commit is contained in:
Christoph Oelckers 2016-05-04 11:33:18 +02:00
commit ab8a647433
4 changed files with 41 additions and 43 deletions

View file

@ -160,6 +160,7 @@ void ADynamicLight::BeginPlay()
m_Radius[0] = args[LIGHT_INTENSITY];
m_Radius[1] = args[LIGHT_SECONDARY_INTENSITY];
visibletoplayer = true;
}
//==========================================================================
@ -237,6 +238,7 @@ void ADynamicLight::Tick()
return;
}
if (target->flags & MF_UNMORPHED) return;
visibletoplayer = target->IsVisibleToPlayer(); // cache this value for the renderer to speed up calculations.
}
// Don't bother if the light won't be shown