v1.5.7.0 (Summer Update)

This commit is contained in:
Regalis11
2024-06-18 16:49:51 +03:00
parent 4a63dacbce
commit 230d1b6e78
263 changed files with 7792 additions and 2845 deletions
@@ -1,4 +1,4 @@
using Barotrauma.Extensions;
using Barotrauma.Extensions;
using Barotrauma.Lights;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -177,10 +177,15 @@ namespace Barotrauma
Stopwatch sw = new Stopwatch();
sw.Start();
GameMain.LightManager.ObstructVision =
Character.Controlled != null &&
Character.Controlled.ObstructVision &&
(Character.Controlled.ViewTarget == Character.Controlled || Character.Controlled.ViewTarget == null);
if (Character.Controlled != null &&
(Character.Controlled.ViewTarget == Character.Controlled || Character.Controlled.ViewTarget == null))
{
GameMain.LightManager.ObstructVisionAmount = Character.Controlled.ObstructVisionAmount;
}
else
{
GameMain.LightManager.ObstructVisionAmount = 0.0f;
}
GameMain.LightManager.UpdateObstructVision(graphics, spriteBatch, cam, Character.Controlled?.CursorWorldPosition ?? Vector2.Zero);