Added a light to diving suits (requires a battery to work). Closes #233

This commit is contained in:
Joonas Rikkonen
2018-03-02 13:11:28 +02:00
parent 12d1692bb5
commit f1f190a997
6 changed files with 28 additions and 10 deletions
@@ -4,6 +4,7 @@ using System.Xml.Linq;
using Barotrauma.Networking;
using Lidgren.Network;
#if CLIENT
using Microsoft.Xna.Framework.Graphics;
using Barotrauma.Lights;
#endif
@@ -144,6 +145,7 @@ namespace Barotrauma.Items.Components
{
#if CLIENT
light.Rotation = body.Dir > 0.0f ? body.Rotation : body.Rotation - MathHelper.Pi;
light.LightSpriteEffect = (body.Dir > 0.0f) ? SpriteEffects.None : SpriteEffects.FlipVertically;
#endif
if (!body.Enabled)
{