Add LightStrength to UDMF, move SoftShadowRadius from AActor to DynamicLight

This commit is contained in:
Ricardo Luís Vaz Silva 2024-10-08 20:46:27 -03:00 committed by Magnus Norddahl
commit 56787bbc17
15 changed files with 88 additions and 20 deletions

View file

@ -127,6 +127,17 @@ void FLightDefaults::ApplyProperties(FDynamicLight * light) const
light->specialf1 = m_Param;
light->pArgs = m_Args;
light->pSoftShadowRadius = &SoftShadowRadius;
if(Strength > 0.0)
{
light->pStrength = const_cast<double*>(&Strength); // casting const to non-const, but positive strength values will not be modified
}
else
{
light->tmpStrength = 0.0;
light->pStrength = &light->tmpStrength;
}
light->pLightFlags = &m_lightFlags;
if (m_lightFlags & LF_SPOT)
{