(ce8e185aa) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -217,7 +217,7 @@ namespace Barotrauma
|
||||
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred,
|
||||
BlendState.AlphaBlend,
|
||||
SamplerState.LinearClamp, DepthStencilState.Default, null, null,
|
||||
SamplerState.LinearClamp, DepthStencilState.DepthRead, null, null,
|
||||
cam.Transform);
|
||||
if (backgroundSpriteManager != null) backgroundSpriteManager.DrawObjects(spriteBatch, cam, drawFront: true);
|
||||
spriteBatch.End();
|
||||
|
||||
@@ -291,11 +291,6 @@ namespace Barotrauma.Lights
|
||||
spriteBatch.Draw(HighlightMap, Vector2.Zero, Color.White);
|
||||
spriteBatch.End();
|
||||
}
|
||||
GameMain.ParticleManager.Draw(spriteBatch, true, null, Particles.ParticleBlendState.Additive);
|
||||
spriteBatch.End();
|
||||
|
||||
//draw a black rectangle on hulls to hide background lights behind subs
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
//draw characters to obstruct the highlighted items/characters and light sprites
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
@@ -500,6 +495,8 @@ namespace Barotrauma.Lights
|
||||
spriteBatch.Draw(backgroundObstructor, new Rectangle(0, 0,
|
||||
(int)(GameMain.GraphicsWidth * currLightMapScale), (int)(GameMain.GraphicsHeight * currLightMapScale)), Color.White);
|
||||
}
|
||||
spriteBatch.End();
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, effect: SolidColorEffect, transformMatrix: spriteBatchTransform);
|
||||
foreach (Character c in Character.CharacterList)
|
||||
{
|
||||
if (c.Enabled) { c.Draw(spriteBatch, cam); }
|
||||
|
||||
@@ -215,23 +215,24 @@ namespace Barotrauma
|
||||
{
|
||||
if (Prefab.BackgroundSprite != null)
|
||||
{
|
||||
bool drawDropShadow = Submarine != null && HasBody;
|
||||
Vector2 dropShadowOffset = Vector2.Zero;
|
||||
if (drawDropShadow)
|
||||
if (UseDropShadow)
|
||||
{
|
||||
dropShadowOffset = Submarine.HiddenSubPosition - Position;
|
||||
if (dropShadowOffset != Vector2.Zero)
|
||||
dropShadowOffset = DropShadowOffset;
|
||||
if (dropShadowOffset == Vector2.Zero)
|
||||
{
|
||||
if (IsHorizontal)
|
||||
if (Submarine == null)
|
||||
{
|
||||
dropShadowOffset = new Vector2(0.0f, Math.Sign(dropShadowOffset.Y) * 10.0f);
|
||||
dropShadowOffset = Vector2.UnitY * 10.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
dropShadowOffset = new Vector2(Math.Sign(dropShadowOffset.X) * 10.0f, 0.0f);
|
||||
dropShadowOffset = IsHorizontal ?
|
||||
new Vector2(0.0f, Math.Sign(Submarine.HiddenSubPosition.Y - Position.Y) * 10.0f) :
|
||||
new Vector2(Math.Sign(Submarine.HiddenSubPosition.X - Position.X) * 10.0f, 0.0f);
|
||||
}
|
||||
dropShadowOffset.Y = -dropShadowOffset.Y;
|
||||
}
|
||||
dropShadowOffset.Y = -dropShadowOffset.Y;
|
||||
}
|
||||
|
||||
if (DrawTiled)
|
||||
@@ -251,7 +252,7 @@ namespace Barotrauma
|
||||
textureScale: TextureScale * Scale,
|
||||
startOffset: backGroundOffset);
|
||||
|
||||
if (drawDropShadow)
|
||||
if (UseDropShadow)
|
||||
{
|
||||
Prefab.BackgroundSprite.DrawTiled(
|
||||
spriteBatch,
|
||||
@@ -276,7 +277,7 @@ namespace Barotrauma
|
||||
rotate: 0,
|
||||
spriteEffect: SpriteEffects);
|
||||
|
||||
if (drawDropShadow)
|
||||
if (UseDropShadow)
|
||||
{
|
||||
Prefab.BackgroundSprite.Draw(
|
||||
spriteBatch,
|
||||
|
||||
Reference in New Issue
Block a user