Fixed inconsistent decal draw order

This commit is contained in:
Joonas Rikkonen
2018-02-13 12:28:54 +02:00
parent fa52c66788
commit ff7f43ca83
2 changed files with 6 additions and 4 deletions
@@ -105,13 +105,13 @@ namespace Barotrauma.Particles
fadeTimer = Prefab.FadeInTime;
}
public void Draw(SpriteBatch spriteBatch, Hull hull)
public void Draw(SpriteBatch spriteBatch, Hull hull, float depth)
{
Vector2 drawPos = position + hull.Rect.Location.ToVector2();
drawPos += hull.Submarine.DrawPosition;
drawPos.Y = -drawPos.Y;
spriteBatch.Draw(Sprite.Texture, drawPos, clippedSourceRect, Color * GetAlpha(), 0, Vector2.Zero, scale, SpriteEffects.None, 1);
spriteBatch.Draw(Sprite.Texture, drawPos, clippedSourceRect, Color * GetAlpha(), 0, Vector2.Zero, scale, SpriteEffects.None, depth);
}
private float GetAlpha()