Close #6: Don't add 0 brightness static lights

This commit is contained in:
Jarrod Doyle 2024-12-09 18:32:16 +00:00
parent cb599f24df
commit 518f387c43
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 8 additions and 2 deletions

View File

@ -178,8 +178,14 @@ public class LightMapper
{ {
// For some reason the light table index on brush lights is 1 indexed // For some reason the light table index on brush lights is 1 indexed
brush.brushInfo = (uint)lightTable.LightCount + 1; brush.brushInfo = (uint)lightTable.LightCount + 1;
var sz = brush.size; var sz = brush.size;
// Ignore 0 brightness lights
if (sz.X == 0)
{
return;
}
var light = new Light var light = new Light
{ {
Position = brush.position, Position = brush.position,
@ -245,7 +251,7 @@ public class LightMapper
baseLight.SpotlightOuterAngle = (float)Math.Cos(float.DegreesToRadians(propSpotlight.OuterAngle)); baseLight.SpotlightOuterAngle = (float)Math.Cos(float.DegreesToRadians(propSpotlight.OuterAngle));
} }
if (propLight != null) if (propLight != null && propLight.Brightness != 0f)
{ {
var light = new Light var light = new Light
{ {