(99feac023) Unstable 0.9.704.0

This commit is contained in:
Joonas Rikkonen
2020-02-07 20:47:03 +02:00
parent 590619459b
commit 6754b9d5a2
104 changed files with 2224 additions and 1091 deletions
@@ -173,6 +173,7 @@ namespace Barotrauma
XDocument doc = OpenFile(filePath);
StartHashDocTask(doc);
hashTask.Wait();
hashTask = null;
}
return hash;
@@ -343,7 +344,10 @@ namespace Barotrauma
public Submarine(string filePath, string hash = "", bool tryLoad = true) : base(null)
{
this.filePath = filePath;
LastModifiedTime = File.GetLastWriteTime(filePath);
if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath))
{
LastModifiedTime = File.GetLastWriteTime(filePath);
}
try
{
name = displayName = Path.GetFileNameWithoutExtension(filePath);
@@ -1631,6 +1635,10 @@ namespace Barotrauma
return false;
}
hash = null;
hashTask = null;
Md5Hash.RemoveFromCache(filePath);
return true;
}