From 506f4054a5a4dae64b9598e76a93575b1918a35e Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Wed, 25 Apr 2012 20:13:12 +0000 Subject: [PATCH] GZDoomBuilder 1.04a: Sector dynamic lights are now rendered properly. --- Source/Core/VisualModes/VisualThing.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/VisualModes/VisualThing.cs b/Source/Core/VisualModes/VisualThing.cs index 3195846c4..66af9e762 100644 --- a/Source/Core/VisualModes/VisualThing.cs +++ b/Source/Core/VisualModes/VisualThing.cs @@ -113,7 +113,6 @@ namespace CodeImp.DoomBuilder.VisualModes //mxd internal int VertexColor { get { return vertices.Length > 0 ? vertices[0].c : 0;} } public int CameraDistance3D { get { return cameraDistance3D; } } - //public int HalfHeight { get { return thingHalfHeight; } } public Vector3 Center { get { return new Vector3(position_v3.X, position_v3.Y, position_v3.Z + thingHeight / 2); } } public Vector3 PositionV3 { get { return position_v3; } } public Vector3[] BoundingBox { get { return boundingBox; } } @@ -374,7 +373,10 @@ namespace CodeImp.DoomBuilder.VisualModes lightType = thing.Type - 9800 - n; if (lightType == (int)GZDoomLightType.SECTOR) { - lightRadiusMin = (float)(thing.Args[3] * 4) * General.Settings.GZDynamicLightRadius; + int scaler = 1; + if (thing.Sector != null) + scaler = thing.Sector.Brightness / 4; + lightRadiusMin = (float)(thing.Args[3] * scaler) * General.Settings.GZDynamicLightRadius; } else { lightRadiusMin = (float)(thing.Args[3] * 2) * General.Settings.GZDynamicLightRadius; //works... that.. way in GZDoom if (lightType > 0) { -- GitLab