Use Slope Skew flag instead of Upper Unpegged for FOF skewing

This commit is contained in:
MascaraSnake 2022-01-05 23:47:05 +01:00
parent e406a52446
commit 659410dde1
3 changed files with 26 additions and 4 deletions

View file

@ -1703,13 +1703,13 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{
texturevpeg = sides[newline->sidenum[0]].rowoffset;
attachtobottom = !!(newline->flags & ML_DONTPEGBOTTOM);
slopeskew = !!(newline->flags & ML_DONTPEGTOP);
slopeskew = !!(newline->flags & ML_SKEWTD);
}
else
{
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
attachtobottom = !!(gl_linedef->flags & ML_DONTPEGBOTTOM);
slopeskew = !!(rover->master->flags & ML_DONTPEGTOP);
slopeskew = !!(rover->master->flags & ML_SKEWTD);
}
grTex = HWR_GetTexture(texnum);

View file

@ -5873,6 +5873,28 @@ static void P_ConvertBinaryLinedefFlags(void)
lines[i].flags |= ML_MIDPEG;
else
lines[i].flags &= ~ML_MIDPEG;
if (lines[i].special >= 100 && lines[i].special < 300)
{
if (lines[i].flags & ML_DONTPEGTOP)
lines[i].flags |= ML_SKEWTD;
else
lines[i].flags = ~ML_SKEWTD;
if ((lines[i].flags & ML_TFERLINE) && lines[i].frontsector)
{
size_t j;
for (j = 0; j < lines[i].frontsector->linecount; j++)
{
if (lines[i].frontsector->lines[j]->flags & ML_DONTPEGTOP)
lines[i].frontsector->lines[j]->flags |= ML_SKEWTD;
else
lines[i].frontsector->lines[j]->flags = ~ML_SKEWTD;
}
}
}
}
}

View file

@ -765,10 +765,10 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
skewslope = *pfloor->t_slope; // skew using top slope by default
if (newline)
{
if (newline->flags & ML_DONTPEGTOP)
if (newline->flags & ML_SKEWTD)
slopeskew = true;
}
else if (pfloor->master->flags & ML_DONTPEGTOP)
else if (pfloor->master->flags & ML_SKEWTD)
slopeskew = true;
if (slopeskew)