Unstable 1.2.4.0
This commit is contained in:
@@ -234,6 +234,15 @@ namespace Barotrauma.Lights
|
||||
}
|
||||
}
|
||||
|
||||
public void DebugDrawVertices(SpriteBatch spriteBatch)
|
||||
{
|
||||
foreach (LightSource light in lights)
|
||||
{
|
||||
if (!light.Enabled) { continue; }
|
||||
light.DebugDrawVertices(spriteBatch);
|
||||
}
|
||||
}
|
||||
|
||||
public void RenderLightMap(GraphicsDevice graphics, SpriteBatch spriteBatch, Camera cam, RenderTarget2D backgroundObstructor = null)
|
||||
{
|
||||
if (!LightingEnabled) { return; }
|
||||
@@ -259,7 +268,8 @@ namespace Barotrauma.Lights
|
||||
{
|
||||
if (!light.Enabled) { continue; }
|
||||
if ((light.Color.A < 1 || light.Range < 1.0f) && !light.LightSourceParams.OverrideLightSpriteAlpha.HasValue) { continue; }
|
||||
|
||||
//above the top boundary of the level (in an inactive respawn shuttle?)
|
||||
if (Level.Loaded != null && light.WorldPosition.Y > Level.Loaded.Size.Y) { continue; }
|
||||
if (light.ParentBody != null)
|
||||
{
|
||||
light.ParentBody.UpdateDrawPosition();
|
||||
@@ -801,6 +811,8 @@ namespace Barotrauma.Lights
|
||||
|
||||
public void ClearLights()
|
||||
{
|
||||
activeLights.Clear();
|
||||
activeLightsWithLightVolume.Clear();
|
||||
lights.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user