Compare commits

..

No commits in common. "5beba9f9f48246bf1afbc58724c34819ed3140ac" and "2ecf17400ea8d1afea9a875d53f263517fa2d3a3" have entirely different histories.

3 changed files with 5 additions and 7 deletions

View File

@ -690,13 +690,13 @@ public class WorldRep : IChunk
if (dynamicLight) if (dynamicLight)
{ {
DynamicLightCount++; DynamicLightCount++;
Lights.Add(data);
} }
else else
{ {
Lights.Insert(LightCount, data);
LightCount++; LightCount++;
} }
Lights.Add(data);
} }
} }

View File

@ -21,7 +21,6 @@ public class Light
public int ObjId; public int ObjId;
public int LightTableIndex; public int LightTableIndex;
public bool Anim; public bool Anim;
public bool Dynamic;
public WorldRep.LightTable.LightData ToLightData(float lightScale) public WorldRep.LightTable.LightData ToLightData(float lightScale)
{ {

View File

@ -310,7 +310,6 @@ public class LightMapper
ObjId = id, ObjId = id,
LightTableIndex = propAnimLight.LightTableLightIndex, LightTableIndex = propAnimLight.LightTableLightIndex,
Anim = true, Anim = true,
Dynamic = propAnimLight.Dynamic,
SpotlightInnerAngle = -1f, SpotlightInnerAngle = -1f,
}; };
@ -325,10 +324,10 @@ public class LightMapper
light.ApplyTransforms(vhotLightPos, vhotLightDir, translate, rotate, scale); light.ApplyTransforms(vhotLightPos, vhotLightDir, translate, rotate, scale);
_lights.Add(light); _lights.Add(light);
lightTable.AddLight(light.ToLightData(32.0f), propAnimLight.Dynamic); lightTable.AddLight(light.ToLightData(32.0f));
} }
if (propLight != null && propLight.Brightness != 0) if (propLight != null)
{ {
var light = new Light var light = new Light
{ {
@ -487,7 +486,7 @@ public class LightMapper
for (var j = 0; j < _lights.Count; j++) for (var j = 0; j < _lights.Count; j++)
{ {
var light = _lights[j]; var light = _lights[j];
if (light.Dynamic || !MathUtils.Intersects(new MathUtils.Sphere(light.Position, light.Radius), cellAabb)) if (!MathUtils.Intersects(new MathUtils.Sphere(light.Position, light.Radius), cellAabb))
{ {
continue; continue;
} }