mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
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:
parent
eb17a8fe8a
commit
118551c70d
4 changed files with 25 additions and 22 deletions
|
@ -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?
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
if(FindClasses(typeof(Plug)).Length > 1)
|
||||
{
|
||||
// Show a warning
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Plugin \"" + shortfilename + "\" has more than one plug. The following class is used to create in instance: " + t.FullName);
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Plugin \"" + shortfilename + "\" has more than one Plug class. The following class is used to create in instance: " + t.FullName);
|
||||
}
|
||||
|
||||
// Make plug instance
|
||||
|
@ -99,14 +99,14 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
if((thisrevision != 0) && (plug.MinimumRevision > thisrevision))
|
||||
{
|
||||
// Can't load this plugin because it is meant for a newer version
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Could not load plugin \"" + shortfilename + "\", the Plugin is made for Doom Builder 2 core revision " + plug.MinimumRevision + " and you are running revision " + thisrevision + ".");
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Could not load plugin \"" + shortfilename + "\", the Plugin is made for GZDoom Builder R" + plug.MinimumRevision + " or newer and you are running R" + thisrevision + ".");
|
||||
throw new InvalidProgramException();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// How can we plug something in without a plug?
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Could not load plugin \"" + shortfilename + "\", plugin is missing the plug. This file is not supposed to be in the Plugins subdirectory.");
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Could not load plugin \"" + shortfilename + "\", plugin is missing the Plug class. This file is not supposed to be in the Plugins subdirectory.");
|
||||
throw new InvalidProgramException();
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(s.CeilTexture == General.Map.Config.SkyFlatName)
|
||||
color = -1; // That's white. With alpha. Not very impressive, eh?
|
||||
else
|
||||
color = (int)((level.color | General.Clamp(level.alpha, 0, 255) << 24) & 0xffffffff); // Byte offset shinanigans! Yay!
|
||||
color = PixelColor.FromInt(level.color).WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
|
||||
|
||||
// Make vertices
|
||||
ReadOnlyCollection<Vector2D> triverts = base.Sector.Sector.Triangles.Vertices;
|
||||
|
|
|
@ -122,10 +122,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
//mxd. Sky is always bright
|
||||
int color;
|
||||
if(s.FloorTexture == General.Map.Config.SkyFlatName)
|
||||
if(s.FloorTexture == General.Map.Config.SkyFlatName)
|
||||
color = -1; // That's white. With alpha. Not very impressive, eh?
|
||||
else
|
||||
color = (int)((level.color | General.Clamp(level.alpha, 0, 255) << 24) & 0xffffffff); // Byte offset shinanigans! Yay!
|
||||
else
|
||||
color = PixelColor.FromInt(level.color).WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
|
||||
|
||||
// Make vertices
|
||||
ReadOnlyCollection<Vector2D> triverts = base.Sector.Sector.Triangles.Vertices;
|
||||
|
@ -138,7 +138,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Vertex coordinates
|
||||
verts[i].x = triverts[i].x;
|
||||
verts[i].y = triverts[i].y;
|
||||
verts[i].z = level.plane.GetZ(triverts[i]); //(float)s.FloorHeight;
|
||||
verts[i].z = level.plane.GetZ(triverts[i]);
|
||||
|
||||
// Texture coordinates
|
||||
Vector2D pos = triverts[i];
|
||||
|
|
Loading…
Reference in a new issue