diff --git a/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs b/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs index 9d2ed314f..eabdc3de3 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs @@ -226,8 +226,11 @@ namespace Barotrauma.Lights Vector2 drawPos = Character.Controlled.DrawPosition; drawPos.Y = -drawPos.Y; + //ambient light decreases the brightness of the halo (no need for a bright halo if the ambient light is bright enough) + float ambientBrightness = (AmbientLight.R + AmbientLight.B + AmbientLight.G) / 255.0f / 3.0f; + Color haloColor = Color.White * (1.0f - ambientBrightness); spriteBatch.Draw( - LightSource.LightTexture, drawPos, null, Color.White * 0.3f, 0.0f, + LightSource.LightTexture, drawPos, null, haloColor * 0.4f, 0.0f, new Vector2(LightSource.LightTexture.Width / 2, LightSource.LightTexture.Height / 2), 1.0f, SpriteEffects.None, 0.0f); } spriteBatch.End(); diff --git a/Barotrauma/BarotraumaShared/BarotraumaShared.projitems b/Barotrauma/BarotraumaShared/BarotraumaShared.projitems index f52dbbe61..9245b0c38 100644 --- a/Barotrauma/BarotraumaShared/BarotraumaShared.projitems +++ b/Barotrauma/BarotraumaShared/BarotraumaShared.projitems @@ -220,6 +220,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/Barotrauma/BarotraumaShared/Content/Items/Diving/DivingSuitLight.png b/Barotrauma/BarotraumaShared/Content/Items/Diving/DivingSuitLight.png new file mode 100644 index 000000000..36cef1dc0 Binary files /dev/null and b/Barotrauma/BarotraumaShared/Content/Items/Diving/DivingSuitLight.png differ diff --git a/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml b/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml index 00a8a928f..761b2a71b 100644 --- a/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml +++ b/Barotrauma/BarotraumaShared/Content/Items/Diving/divinggear.xml @@ -81,14 +81,14 @@ - - - + + + + + - - @@ -121,10 +121,13 @@ - + + + + diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/LightComponent.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/LightComponent.cs index 6c79d771f..44544993a 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/LightComponent.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/LightComponent.cs @@ -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) { diff --git a/Barotrauma/BarotraumaShared/Source/Networking/RespawnManager.cs b/Barotrauma/BarotraumaShared/Source/Networking/RespawnManager.cs index 90cafee63..c575f8f4a 100644 --- a/Barotrauma/BarotraumaShared/Source/Networking/RespawnManager.cs +++ b/Barotrauma/BarotraumaShared/Source/Networking/RespawnManager.cs @@ -505,11 +505,18 @@ namespace Barotrauma.Networking if (divingSuitPrefab != null && oxyPrefab != null) { var divingSuit = new Item(divingSuitPrefab, pos, respawnSub); - Entity.Spawner.CreateNetworkEvent(divingSuit, false); + Spawner.CreateNetworkEvent(divingSuit, false); var oxyTank = new Item(oxyPrefab, pos, respawnSub); - Entity.Spawner.CreateNetworkEvent(oxyTank, false); - divingSuit.Combine(oxyTank); + Spawner.CreateNetworkEvent(oxyTank, false); + divingSuit.Combine(oxyTank); + + if (batteryPrefab != null) + { + var battery = new Item(batteryPrefab, pos, respawnSub); + Spawner.CreateNetworkEvent(battery, false); + divingSuit.Combine(battery); + } } if (scooterPrefab != null && batteryPrefab != null)