From fbf4b4fcadaae5867347f595345c09ead130fdb6 Mon Sep 17 00:00:00 2001 From: Regalis Date: Thu, 13 Oct 2016 16:02:54 +0300 Subject: [PATCH] LOS can be disabled through the console, slightly brighter default LOS color --- Subsurface/Source/Screens/GameScreen.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Subsurface/Source/Screens/GameScreen.cs b/Subsurface/Source/Screens/GameScreen.cs index 2c860927d..f17e12431 100644 --- a/Subsurface/Source/Screens/GameScreen.cs +++ b/Subsurface/Source/Screens/GameScreen.cs @@ -321,7 +321,7 @@ namespace Barotrauma GameMain.ParticleManager.Draw(spriteBatch, false, Particles.ParticleBlendState.Additive); spriteBatch.End(); - if (Character.Controlled != null) + if (Character.Controlled != null && GameMain.LightManager.LosEnabled) { graphics.SetRenderTarget(renderTarget); spriteBatch.Begin(SpriteSortMode.Deferred, @@ -394,15 +394,16 @@ namespace Barotrauma spriteBatch.End(); - if (Character.Controlled != null) + if (Character.Controlled != null && GameMain.LightManager.LosEnabled) { GameMain.LightManager.DrawLOS(spriteBatch, lightBlur.Effect,false); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); - float r = Math.Min(CharacterHUD.damageOverlayTimer * 0.5f, 0.1f); + float r = Math.Min(CharacterHUD.damageOverlayTimer * 0.5f, 0.5f); spriteBatch.Draw(renderTarget, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), - new Color(r, Math.Max(0.07f-r*0.07f/0.1f,0.0f), Math.Max(0.1f - r, 0.0f), 1.0f)); + Color.Lerp(new Color(0.1f, 0.1f, 0.1f), Color.Red, r)); + spriteBatch.End(); }