mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-01-31 05:00:34 +00:00
Render SRB2's repeating midtextures in Visual Mode
This commit is contained in:
parent
4abdf3a65b
commit
092f8581ab
1 changed files with 5 additions and 4 deletions
|
@ -192,20 +192,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
CropPoly(ref poly, osd.Floor.plane, true);
|
||||
|
||||
// Determine if we should repeat the middle texture
|
||||
repeatmidtex = Sidedef.IsFlagSet("wrapmidtex") || Sidedef.Line.IsFlagSet("wrapmidtex"); //mxd
|
||||
if(!repeatmidtex)
|
||||
repeatmidtex = (General.Map.SRB2 && Sidedef.Line.IsFlagSet("1024")) || Sidedef.IsFlagSet("wrapmidtex") || Sidedef.Line.IsFlagSet("wrapmidtex"); //mxd
|
||||
if(!repeatmidtex || (General.Map.SRB2 && Sidedef.OffsetX >= 4096))
|
||||
{
|
||||
// First determine the visible portion of the texture
|
||||
float textop;
|
||||
int repetitions = General.Map.SRB2 ? (Sidedef.OffsetX / 4096) + 1 : 1;
|
||||
|
||||
// Determine top portion height
|
||||
if(Sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag))
|
||||
textop = geobottom + tof.y + Math.Abs(tsz.y);
|
||||
textop = geobottom + tof.y + repetitions * Math.Abs(tsz.y);
|
||||
else
|
||||
textop = geotop + tof.y;
|
||||
|
||||
// Calculate bottom portion height
|
||||
float texbottom = textop - Math.Abs(tsz.y);
|
||||
float texbottom = textop - repetitions * Math.Abs(tsz.y);
|
||||
|
||||
// Create crop planes (we also need these for intersection testing)
|
||||
topclipplane = new Plane(new Vector3D(0, 0, -1), textop);
|
||||
|
|
Loading…
Reference in a new issue