(d9829ac) v0.9.4.0

This commit is contained in:
Regalis
2019-10-24 18:05:42 +02:00
parent 9aa12bcac2
commit b39922a074
319 changed files with 12516 additions and 6815 deletions
@@ -119,6 +119,7 @@ namespace Barotrauma
DecompressToDirectory(filePath, TempPath, null);
XDocument doc = XMLExtensions.TryLoadXml(Path.Combine(TempPath, "gamesession.xml"));
if (doc == null) { return; }
string subPath = Path.Combine(TempPath, doc.Root.GetAttributeString("submarine", "")) + ".sub";
Submarine selectedSub = new Submarine(subPath, "");
@@ -130,6 +131,7 @@ namespace Barotrauma
DebugConsole.Log("Loading save file for an existing game session (" + filePath + ")");
DecompressToDirectory(filePath, TempPath, null);
XDocument doc = XMLExtensions.TryLoadXml(Path.Combine(TempPath, "gamesession.xml"));
if (doc == null) { return; }
gameSession.Load(doc.Root);
}
@@ -303,12 +305,6 @@ namespace Barotrauma
public static Stream DecompressFiletoStream(string fileName)
{
if (!File.Exists(fileName))
{
DebugConsole.ThrowError("File \"" + fileName + " doesn't exist!");
return null;
}
using (FileStream originalFileStream = new FileStream(fileName, FileMode.Open))
{
MemoryStream decompressedFileStream = new MemoryStream();