Build 0.18.2.0

This commit is contained in:
Markus Isberg
2022-05-19 23:43:21 +09:00
parent d4f6f4cf88
commit 077917fa5d
115 changed files with 1080 additions and 1763 deletions
@@ -7,11 +7,6 @@ namespace Barotrauma
{
private readonly Dictionary<Identifier, Action<T>> events = new Dictionary<Identifier, Action<T>>();
~NamedEvent()
{
ReleaseUnmanagedResources();
}
public void Register(Identifier identifier, Action<T> action)
{
if (HasEvent(identifier))
@@ -53,15 +48,9 @@ namespace Barotrauma
}
}
private void ReleaseUnmanagedResources()
public void Dispose()
{
events.Clear();
}
public void Dispose()
{
ReleaseUnmanagedResources();
GC.SuppressFinalize(this);
}
}
}
@@ -429,8 +429,8 @@ namespace Barotrauma.IO
public class FileStream : System.IO.Stream
{
private System.IO.FileStream innerStream;
private string fileName;
private readonly System.IO.FileStream innerStream;
private readonly string fileName;
public FileStream(string fn, System.IO.FileStream stream)
{
@@ -496,9 +496,9 @@ namespace Barotrauma.IO
innerStream.Flush();
}
protected override void Dispose(bool disposing)
protected override void Dispose(bool notCalledByFinalizer)
{
innerStream.Dispose();
if (notCalledByFinalizer) { innerStream.Dispose(); }
}
}
@@ -479,7 +479,7 @@ namespace Barotrauma
{
int read = 0;
// FIXME workaround for .NET6 causing save decompression to fail
// BUG workaround for .NET6 causing save decompression to fail
#if NET6_0
for (int i = 0; i < amount; i++)
{