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:
biwa 2023-11-19 16:53:36 +01:00
parent 501c2f952d
commit f7373f7534
4 changed files with 5 additions and 5 deletions

View file

@ -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))
); );
} }
} }

View file

@ -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))
); );
} }
} }

View file

@ -324,7 +324,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("scalex_mid", 1.0))
); );
} }
} }

View file

@ -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))
); );
} }
} }