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

@ -6181,8 +6181,6 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position)
if (mthing->fillcolor)
mobj->fillcolor = (mthing->fillcolor & 0xffffff) | (ColorMatcher.Pick((mthing->fillcolor & 0xff0000) >> 16,
(mthing->fillcolor & 0xff00) >> 8, (mthing->fillcolor & 0xff)) << 24);
if (mthing->SoftShadowRadius >= 0.0)
mobj->SoftShadowRadius = mthing->SoftShadowRadius;
// allow color strings for lights and reshuffle the args for spot lights
if (i->IsDescendantOf(NAME_DynamicLight))
@ -6206,6 +6204,20 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position)
mobj->AngleVar(NAME_SpotInnerAngle) = DAngle::fromDeg(mthing->args[1]);
mobj->AngleVar(NAME_SpotOuterAngle) = DAngle::fromDeg(mthing->args[2]);
}
if (mthing->SoftShadowRadius >= 0.0)
{
mobj->FloatVar(NAME_SoftShadowRadius) = mthing->SoftShadowRadius;
}
else
{
mobj->FloatVar(NAME_SoftShadowRadius) = 5.0;
}
if (mthing->LightStrength > 0.0)
{
mobj->FloatVar(NAME_LightStrength) = mthing->LightStrength;
}
}
mobj->CallBeginPlay ();