Fixed(?), PK3: SharpCompress doesn't like it when several threads try to read PK3 archive entries at the same time.

Fixed, Visual mode, 3d floors: floor and ceiling alpha calculation was broken.
This commit is contained in:
MaxED 2015-05-28 10:04:42 +00:00
parent eb17a8fe8a
commit 118551c70d
4 changed files with 25 additions and 22 deletions

View file

@ -422,22 +422,25 @@ namespace CodeImp.DoomBuilder.Data
}
else
{
UpdateArchive(true);
foreach (var entry in archive.Entries)
lock (this)
{
if (entry.IsDirectory) continue;
// Is this the entry we are looking for?
if(string.Compare(entry.Key, fn, true) == 0)
{
filedata = new MemoryStream();
entry.WriteTo(filedata);
break;
}
}
UpdateArchive(true);
UpdateArchive(false);
foreach (var entry in archive.Entries)
{
if(entry.IsDirectory) continue;
// Is this the entry we are looking for?
if(string.Compare(entry.Key, fn, true) == 0)
{
filedata = new MemoryStream();
entry.WriteTo(filedata);
break;
}
}
UpdateArchive(false);
}
}
// Nothing found?