Fixed timestep logic is disabled during loading (less choppy loading screens & no pause at the start of the game), damageable structures visible in LOS again, footstep sound tweaking

This commit is contained in:
Regalis
2016-11-01 19:05:09 +02:00
parent 9b29c52a1b
commit 1b818b6422
5 changed files with 41 additions and 31 deletions
+13 -10
View File
@@ -294,18 +294,23 @@ namespace Barotrauma
{
MapEntity.mapEntityList[i].Draw(spriteBatch, editing);
}
}
public static void DrawFront(SpriteBatch spriteBatch, bool editing = false)
public static void DrawFront(SpriteBatch spriteBatch, bool editing = false, Predicate<MapEntity> predicate = null)
{
for (int i = 0; i < MapEntity.mapEntityList.Count; i++)
{
if (MapEntity.mapEntityList[i].DrawOverWater)
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, false);
}
if (!MapEntity.mapEntityList[i].DrawOverWater) continue;
if (predicate != null)
{
if (!predicate(MapEntity.mapEntityList[i])) continue;
}
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, false);
}
if (GameMain.DebugDraw)
{
foreach (Submarine sub in Submarine.Loaded)
@@ -325,10 +330,7 @@ namespace Barotrauma
prevPos = currPos;
}
}
}
}
@@ -351,13 +353,14 @@ namespace Barotrauma
{
for (int i = 0; i < MapEntity.mapEntityList.Count; i++)
{
if (!MapEntity.mapEntityList[i].DrawBelowWater) continue;
if (predicate != null)
{
if (!predicate(MapEntity.mapEntityList[i])) continue;
}
if (MapEntity.mapEntityList[i].DrawBelowWater)
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, true);
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, true);
}
}