Obstructing vision when wearing a diving suit or mask

This commit is contained in:
Regalis11
2015-11-01 17:47:59 +02:00
parent b0deba514e
commit 73bde75c2e
8 changed files with 77 additions and 15 deletions

View File

@@ -161,8 +161,11 @@ namespace Barotrauma
public void DrawMap(GraphicsDevice graphics, SpriteBatch spriteBatch)
{
GameMain.LightManager.ObstructVision = Character.Controlled != null && Character.Controlled.ObstructVision;
GameMain.LightManager.UpdateLightMap(graphics, spriteBatch, cam);
GameMain.LightManager.UpdateObstructVision(graphics, spriteBatch, cam,
Character.Controlled==null ? LightManager.ViewPos : Character.Controlled.CursorPosition);
//----------------------------------------------------------------------------------------
//1. draw the background, characters and the parts of the submarine that are behind them
@@ -312,7 +315,7 @@ namespace Barotrauma
spriteBatch.End();
GameMain.LightManager.DrawLOS(graphics, cam, LightManager.ViewPos);
GameMain.LightManager.DrawLOS(graphics, spriteBatch, cam, LightManager.ViewPos);
}
}
}