(7f0d0fe11) Fixed specular maps going over characters, fixed levelobject draw order not working correctly in the level editor

This commit is contained in:
Joonas Rikkonen
2019-04-11 18:28:10 +03:00
parent 2f86991ce5
commit ddfdb3f4bf
2 changed files with 3 additions and 1 deletions

View File

@@ -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();

View File

@@ -495,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); }