add light_noshadowmap/light_dontlightactors/light_dontlightmap to UDMF

This commit is contained in:
Ricardo Luís Vaz Silva 2024-10-08 20:48:42 -03:00 committed by Magnus Norddahl
commit 479e0c301e
5 changed files with 36 additions and 0 deletions

View file

@ -432,6 +432,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
light_strength = <float>; // Light strenght for Inverse-square falloff lights. Default = 0.0 (auto)
light_noshadowmap = <bool>; // Disable shadows for light
light_dontlightactors = <bool>; // Don't light actors
light_dontlightmap = <bool>; // Don't light map geometry
friendlyseeblocks = <int>; // How far (in block units) a friendly monster can see other monsters. Default 10

View file

@ -385,6 +385,9 @@ struct FMapThing
FName arg0str;
double SoftShadowRadius;
double LightStrength;
bool LightNoShadowMap;
bool LightDontLightActors;
bool LightDontLightMap;
};

View file

@ -800,6 +800,18 @@ public:
th->LightStrength = CheckFloat(key);
break;
case NAME_light_noshadowmap:
th->LightNoShadowMap = CheckBool(key);
break;
case NAME_light_dontlightactors:
th->LightDontLightActors = CheckBool(key);
break;
case NAME_light_dontlightmap:
th->LightDontLightMap = CheckBool(key);
break;
case NAME_lm_suncolor:
CHECK_N(Zd | Zdt)
if (CheckInt(key) < 0 || CheckInt(key) > 0xFFFFFF)

View file

@ -872,6 +872,9 @@ xx(lm_suncolor)
// Light keywords
xx(light_softshadowradius)
xx(light_strength)
xx(light_noshadowmap)
xx(light_dontlightactors)
xx(light_dontlightmap)
xx(skew_bottom_type)
xx(skew_middle_type)

View file

@ -6218,6 +6218,21 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position)
{
mobj->FloatVar(NAME_LightStrength) = mthing->LightStrength;
}
if (mthing->LightNoShadowMap)
{
mobj->IntVar(NAME_lightflags) |= LF_NOSHADOWMAP;
}
if (mthing->LightDontLightActors)
{
mobj->IntVar(NAME_lightflags) |= LF_DONTLIGHTACTORS;
}
if (mthing->LightDontLightMap)
{
mobj->IntVar(NAME_lightflags) |= LF_DONTLIGHTMAP;
}
}
mobj->CallBeginPlay ();