Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Barotrauma.Extensions;
|
||||
using Barotrauma.Extensions;
|
||||
using Barotrauma.Lights;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -178,10 +178,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user