diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs b/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs index 2d4d93c3..26951583 100755 --- a/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs @@ -337,11 +337,11 @@ namespace CodeImp.DoomBuilder.BuilderModes string skewtype = Sidedef.Fields.GetValue("skew_bottom_type", "none"); - if ((skewtype == "front" || skewtype == "back") && Texture != null) + if ((skewtype == "front_floor" || skewtype == "front_ceiling" || skewtype == "back_floor" || skewtype == "back_ceiling") && Texture != null) { double leftz, rightz; - if (skewtype == "front") + if (skewtype == "front_floor") { if (Sidedef.IsFront) { @@ -356,7 +356,7 @@ namespace CodeImp.DoomBuilder.BuilderModes rightz = plane.GetZ(Sidedef.Line.Start.Position); } } - else // "back" + else if(skewtype == "back_floor") { if (Sidedef.IsFront) { @@ -370,7 +370,36 @@ namespace CodeImp.DoomBuilder.BuilderModes leftz = plane.GetZ(Sidedef.Line.End.Position); rightz = plane.GetZ(Sidedef.Line.Start.Position); } - + } + else if(skewtype == "front_ceiling") + { + if (Sidedef.IsFront) + { + Plane plane = Sector.GetSectorData().Ceiling.plane; + leftz = plane.GetZ(Sidedef.Line.Start.Position); + rightz = plane.GetZ(Sidedef.Line.End.Position); + } + else + { + Plane plane = mode.GetSectorData(Sidedef.Other.Sector).Ceiling.plane; + leftz = plane.GetZ(Sidedef.Line.End.Position); + rightz = plane.GetZ(Sidedef.Line.Start.Position); + } + } + else // Back ceiling + { + if (Sidedef.IsFront) + { + Plane plane = mode.GetSectorData(Sidedef.Other.Sector).Ceiling.plane; + leftz = plane.GetZ(Sidedef.Line.Start.Position); + rightz = plane.GetZ(Sidedef.Line.End.Position); + } + else + { + Plane plane = Sector.GetSectorData().Ceiling.plane; + leftz = plane.GetZ(Sidedef.Line.End.Position); + rightz = plane.GetZ(Sidedef.Line.Start.Position); + } } skew = new Vector2f( diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs b/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs index dccfe4fc..40559589 100755 --- a/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs @@ -325,11 +325,11 @@ namespace CodeImp.DoomBuilder.BuilderModes string skewtype = Sidedef.Fields.GetValue("skew_top_type", "none"); - if ((skewtype == "front" || skewtype == "back") && Texture != null) + if ((skewtype == "front_floor" || skewtype == "front_ceiling" || skewtype == "back_floor" || skewtype == "back_ceiling") && Texture != null) { double leftz, rightz; - if (skewtype == "front") + if (skewtype == "front_ceiling") { if (Sidedef.IsFront) { @@ -344,7 +344,7 @@ namespace CodeImp.DoomBuilder.BuilderModes rightz = plane.GetZ(Sidedef.Line.Start.Position); } } - else // "back" + else if (skewtype == "back_ceiling") { if (Sidedef.IsFront) { @@ -358,7 +358,36 @@ namespace CodeImp.DoomBuilder.BuilderModes leftz = plane.GetZ(Sidedef.Line.End.Position); rightz = plane.GetZ(Sidedef.Line.Start.Position); } - + } + else if(skewtype == "front_floor") + { + if(Sidedef.IsFront) + { + Plane plane = Sector.GetSectorData().Floor.plane; + leftz = plane.GetZ(Sidedef.Line.Start.Position); + rightz = plane.GetZ(Sidedef.Line.End.Position); + } + else + { + Plane plane = mode.GetSectorData(Sidedef.Other.Sector).Floor.plane; + leftz = plane.GetZ(Sidedef.Line.End.Position); + rightz = plane.GetZ(Sidedef.Line.Start.Position); + } + } + else // Back floor + { + if (Sidedef.IsFront) + { + Plane plane = mode.GetSectorData(Sidedef.Other.Sector).Floor.plane; + leftz = plane.GetZ(Sidedef.Line.Start.Position); + rightz = plane.GetZ(Sidedef.Line.End.Position); + } + else + { + Plane plane = Sector.GetSectorData().Floor.plane; + leftz = plane.GetZ(Sidedef.Line.End.Position); + rightz = plane.GetZ(Sidedef.Line.Start.Position); + } } skew = new Vector2f(