mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-25 13:21:28 +00:00
Visual Mode: fixed a problem where texture skewing didn't work correctly for textures scaled through sidedef properties. Fixes #985
This commit is contained in:
parent
501c2f952d
commit
f7373f7534
4 changed files with 5 additions and 5 deletions
|
@ -359,7 +359,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
skew = new Vector2f(
|
skew = new Vector2f(
|
||||||
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
||||||
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height))
|
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height) * Sidedef.Fields.GetValue("scaley_bottom", 1.0) / Sidedef.Fields.GetValue("scalex_bottom", 1.0))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -455,7 +455,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
skew = new Vector2f(
|
skew = new Vector2f(
|
||||||
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
||||||
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height))
|
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height) * Sidedef.Fields.GetValue("scaley_mid", 1.0) / Sidedef.Fields.GetValue("scaley_mid", 1.0))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,8 +324,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
skew = new Vector2f(
|
skew = new Vector2f(
|
||||||
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
||||||
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height))
|
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height) * Sidedef.Fields.GetValue("scaley_mid", 1.0) / Sidedef.Fields.GetValue("scalex_mid", 1.0))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (General.Map.Config.SkewStyle == Config.SkewStyle.EternityEngine)
|
else if (General.Map.Config.SkewStyle == Config.SkewStyle.EternityEngine)
|
||||||
|
|
|
@ -347,7 +347,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
skew = new Vector2f(
|
skew = new Vector2f(
|
||||||
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
Vertices.Min(v => v.u), // Get the lowest horizontal texture offset
|
||||||
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height))
|
(float)((rightz - leftz) / Sidedef.Line.Length * ((double)Texture.Width / Texture.Height) * Sidedef.Fields.GetValue("scaley_top", 1.0) / Sidedef.Fields.GetValue("scalex_top", 1.0))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue