diff --git a/README.md b/README.md index f5e6ae8..4b52793 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,13 @@ thing // ZDRayInfo (ZDRay properties for the map) thing // Lightmap point light (Light color and distance properties use the same args as dynamic lights) { type = 9876; - SoftShadowRadius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature) + light_softshadowradius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature) } thing // Lightmap spotlight (Light color, distance and angle properties use the same args as dynamic lights) { type = 9881; - SoftShadowRadius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature) + light_softshadowradius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature) } linedef diff --git a/src/level/level_light.cpp b/src/level/level_light.cpp index 3a4072f..b6f6f7a 100644 --- a/src/level/level_light.cpp +++ b/src/level/level_light.cpp @@ -264,6 +264,7 @@ void FLevel::CreateLights() // UDB's color picker will assign the color as a hex string, stored // in the arg0str field. detect this, so that it can be converted into an int + // this behavior is unique to spotlights. if (thing->arg0str.Len() > 0) { FString hex = "0x" + thing->arg0str; @@ -282,16 +283,16 @@ void FLevel::CreateLights() for (const auto& prop : thing->props) { - if (!stricmp(prop.key, "softshadowradius")) + if (!stricmp(prop.key, "light_softshadowradius")) { softshadowradius = atof(prop.value); } } - // this is known as "intensity" on dynamic lights (and in UDB) + // this is known as "intensity" on dynamic lights (and in UDB) - what it actually is though, is the radius lightDistance = thing->args[3]; - // lightmap light intensity (not to be confused with dynamic lights' intensity, which is actually lightmap light distance + // light intensity is how bright or dark a light is. can go below or above 1.0. lightIntensity = thing->alpha; if (lightDistance > 0.0f && lightIntensity > 0.0f && lightColor != FVector3(0, 0, 0))