Unstable v0.1300.0.0 (February 19th 2021)

This commit is contained in:
Joonas Rikkonen
2021-02-25 13:44:23 +02:00
parent b772654326
commit 24cbef485a
441 changed files with 21343 additions and 8562 deletions
@@ -19,6 +19,8 @@ namespace Barotrauma
private set;
}
private static volatile bool cancelAll = false;
public static void Init(GraphicsDevice graphicsDevice, bool needsBmp = false)
{
_graphicsDevice = graphicsDevice;
@@ -36,6 +38,11 @@ namespace Barotrauma
});
}
public static void CancelAll()
{
cancelAll = true;
}
private static byte[] CompressDxt5(byte[] data, int width, int height)
{
using (System.IO.MemoryStream mstream = new System.IO.MemoryStream())
@@ -220,6 +227,7 @@ namespace Barotrauma
Texture2D tex = null;
CrossThread.RequestExecutionOnMainThread(() =>
{
if (cancelAll) { return; }
tex = new Texture2D(_graphicsDevice, width, height, mipmap, format);
tex.SetData(textureData);
});