Crates, some new chemicals, statuseffects that are triggered on impact, explosions can trigger "OnFire" statuseffects, applying impulses to items (and not just characters) when the submarine hits something

This commit is contained in:
Regalis
2016-04-16 15:33:28 +03:00
parent c6df095a8b
commit 6876bdc481
18 changed files with 271 additions and 74 deletions
@@ -179,9 +179,6 @@ namespace Barotrauma
public void DrawSprites(SpriteBatch spriteBatch, Camera cam)
{
Stopwatch sw = new Stopwatch();
sw.Start();
Rectangle indices = Rectangle.Empty;
indices.X = (int)Math.Floor(cam.WorldView.X / (float)GridSize) - 1;
if (indices.X >= sprites.GetLength(0)) return;
@@ -189,7 +186,6 @@ namespace Barotrauma
indices.Y = (int)Math.Floor((cam.WorldView.Y - cam.WorldView.Height) / (float)GridSize) - 1;
if (indices.Y >= sprites.GetLength(1)) return;
indices.Width = (int)Math.Ceiling(cam.WorldView.Right / (float)GridSize) + 1;
if (indices.Width < 0) return;
indices.Height = (int)Math.Ceiling(cam.WorldView.Y / (float)GridSize) + 1;
@@ -212,9 +208,6 @@ namespace Barotrauma
}
}
}
sw.Stop();
Debug.WriteLine(sw.ElapsedMilliseconds + " - "+sw.ElapsedTicks);
}
private BackgroundSpritePrefab GetRandomPrefab()