diff --git a/KeepersCompound.LGS/Database/ObjectHierarchy.cs b/KeepersCompound.LGS/Database/ObjectHierarchy.cs index 3a88c22..a66888c 100644 --- a/KeepersCompound.LGS/Database/ObjectHierarchy.cs +++ b/KeepersCompound.LGS/Database/ObjectHierarchy.cs @@ -106,7 +106,8 @@ public class ObjectHierarchy AddProp("P$Spotlight"); } - public T GetProperty(int objectId, string propName) where T : Property + // TODO: Work out if there's some nice way to automatically decide if we inherit + public T GetProperty(int objectId, string propName, bool inherit = true) where T : Property { if (!_objects.ContainsKey(objectId)) { @@ -122,7 +123,7 @@ public class ObjectHierarchy } var prop = obj.GetProperty(propName); - if (prop != null) + if (prop != null || !inherit) { return prop; } diff --git a/KeepersCompound.Lightmapper/Program.cs b/KeepersCompound.Lightmapper/Program.cs index 37bbb10..20d7c83 100644 --- a/KeepersCompound.Lightmapper/Program.cs +++ b/KeepersCompound.Lightmapper/Program.cs @@ -1,4 +1,4 @@ -using System.Diagnostics; +using System.Diagnostics; using System.Numerics; using KeepersCompound.LGS; using KeepersCompound.LGS.Database; @@ -132,7 +132,8 @@ class Program { // TODO: Handle PropSpotlightAndAmbient var id = (int)brush.brushInfo; - var propLight = hierarchy.GetProperty(id, "P$Light"); + var propAnimLight = hierarchy.GetProperty(id, "P$AnimLight", false); + var propLight = hierarchy.GetProperty(id, "P$Light", false); var propLightColor = hierarchy.GetProperty(id, "P$LightColo"); var propSpotlight = hierarchy.GetProperty(id, "P$Spotlight"); var propModelname = hierarchy.GetProperty(id, "P$ModelName");