mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 13:51:40 +00:00
Fixed display and auto-align issues when using hires texture replacements with local scaling
This commit is contained in:
parent
8115d12b6c
commit
ef4c763879
6 changed files with 42 additions and 4 deletions
|
@ -4285,8 +4285,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
backwardoffset = j.offsetx;
|
||||
|
||||
if(!worldpanning)
|
||||
forwardoffset = (float)Math.Round((j.offsetx + (float)Math.Round(j.sidedef.Line.Length) / scalex * Math.Abs(first.scaleX)) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
if (!worldpanning)
|
||||
{
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (texture is HiResImage)
|
||||
forwardoffset = j.offsetx + (float)Math.Round(((float)Math.Round(j.sidedef.Line.Length) / scalex) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
else
|
||||
forwardoffset = j.offsetx + (float)Math.Round(((float)Math.Round(j.sidedef.Line.Length) / scalex * Math.Abs(first.scaleX)) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
}
|
||||
else
|
||||
forwardoffset = (float)Math.Round((j.offsetx + (float)Math.Round(j.sidedef.Line.Length)) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
|
||||
|
@ -4310,7 +4316,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
float offset;
|
||||
|
||||
if(!worldpanning)
|
||||
offset = (float)Math.Round((j.offsetx - j.sidedef.OffsetX - (float)Math.Round(j.sidedef.Line.Length) / scalex * first.scaleX) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
{
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (texture is HiResImage)
|
||||
offset = (float)Math.Round((j.offsetx - j.sidedef.OffsetX - (float)Math.Round(j.sidedef.Line.Length) / scalex) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
else
|
||||
offset = (float)Math.Round((j.offsetx - j.sidedef.OffsetX - (float)Math.Round(j.sidedef.Line.Length) / scalex * first.scaleX) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
}
|
||||
else
|
||||
offset = (float)Math.Round((j.offsetx - j.sidedef.OffsetX - (float)Math.Round(j.sidedef.Line.Length)) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
|
||||
|
@ -4426,7 +4438,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
forwardoffset = j.offsetx;
|
||||
|
||||
if (!worldpanning)
|
||||
backwardoffset = (float)Math.Round((j.offsetx - (float)Math.Round(j.sidedef.Line.Length) / scalex * first.scaleX) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
{
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (texture is HiResImage)
|
||||
backwardoffset = (float)Math.Round((j.offsetx - (float)Math.Round(j.sidedef.Line.Length) / scalex) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
else
|
||||
backwardoffset = (float)Math.Round((j.offsetx - (float)Math.Round(j.sidedef.Line.Length) / scalex * Math.Abs(first.scaleX)) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
}
|
||||
else
|
||||
backwardoffset = (float)Math.Round((j.offsetx - (float)Math.Round(j.sidedef.Line.Length)) % vwidth, General.Map.FormatInterface.VertexDecimals);
|
||||
|
||||
|
|
|
@ -139,6 +139,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
tof = tof / tscaleAbs;
|
||||
tof = tof * base.Texture.Scale;
|
||||
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (base.Texture is HiResImage)
|
||||
tof *= tscaleAbs;
|
||||
}
|
||||
|
||||
// Determine texture coordinates plane as they would be in normal circumstances.
|
||||
|
|
|
@ -157,6 +157,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
tof = tof / tscaleAbs;
|
||||
tof = tof * base.Texture.Scale;
|
||||
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (base.Texture is HiResImage)
|
||||
tof *= tscaleAbs;
|
||||
}
|
||||
|
||||
// For Vavoom type 3D floors the ceiling is lower than floor and they are reversed.
|
||||
|
|
|
@ -139,6 +139,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
tof = tof / tscaleAbs;
|
||||
tof = tof * base.Texture.Scale;
|
||||
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (base.Texture is HiResImage)
|
||||
tof *= tscaleAbs;
|
||||
}
|
||||
|
||||
// Determine texture coordinates plane as they would be in normal circumstances.
|
||||
|
|
|
@ -125,6 +125,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
tof = tof / tscaleAbs;
|
||||
tof = tof * base.Texture.Scale;
|
||||
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (base.Texture is HiResImage)
|
||||
tof *= tscaleAbs;
|
||||
}
|
||||
|
||||
// Determine texture coordinates plane as they would be in normal circumstances.
|
||||
|
|
|
@ -140,6 +140,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
tof = tof / tscaleAbs;
|
||||
tof = tof * base.Texture.Scale;
|
||||
|
||||
// If the texture gets replaced with a "hires" texture it adds more fuckery
|
||||
if (base.Texture is HiResImage)
|
||||
tof *= tscaleAbs;
|
||||
}
|
||||
|
||||
// Determine texture coordinates plane as they would be in normal circumstances.
|
||||
|
|
Loading…
Reference in a new issue