mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
Make only ML_EFFECT3 affect midtexture pegging in UDMF
This commit is contained in:
parent
d25bc75a92
commit
06b7d7ceb8
4 changed files with 20 additions and 12 deletions
|
@ -1330,7 +1330,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
if (gl_linedef->flags & ML_EFFECT2)
|
||||
{
|
||||
if (!!(gl_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gl_linedef->flags & ML_EFFECT3))
|
||||
if (gl_linedef->flags & ML_EFFECT3)
|
||||
{
|
||||
polybottom = max(front->floorheight, back->floorheight) + gl_sidedef->rowoffset;
|
||||
polytop = polybottom + textureheight[gl_midtexture]*repeats;
|
||||
|
@ -1341,7 +1341,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
polybottom = polytop - textureheight[gl_midtexture]*repeats;
|
||||
}
|
||||
}
|
||||
else if (!!(gl_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gl_linedef->flags & ML_EFFECT3))
|
||||
else if (gl_linedef->flags & ML_EFFECT3)
|
||||
{
|
||||
polybottom = popenbottom + gl_sidedef->rowoffset;
|
||||
polytop = polybottom + textureheight[gl_midtexture]*repeats;
|
||||
|
@ -1371,7 +1371,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
{
|
||||
// PEGGING
|
||||
if (!!(gl_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gl_linedef->flags & ML_EFFECT3))
|
||||
if (gl_linedef->flags & ML_EFFECT3)
|
||||
texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom;
|
||||
else
|
||||
texturevpeg = polytop - h;
|
||||
|
@ -1396,7 +1396,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
if (gl_linedef->flags & ML_EFFECT2)
|
||||
midtextureslant = 0;
|
||||
else if (!!(gl_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gl_linedef->flags & ML_EFFECT3))
|
||||
else if (gl_linedef->flags & ML_EFFECT3)
|
||||
midtextureslant = worldlow < worldbottom
|
||||
? worldbottomslope-worldbottom
|
||||
: worldlowslope-worldlow;
|
||||
|
@ -1421,7 +1421,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
|
||||
{
|
||||
// PEGGING
|
||||
if (!!(gl_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gl_linedef->flags & ML_EFFECT3))
|
||||
if (gl_linedef->flags & ML_EFFECT3)
|
||||
texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom;
|
||||
else
|
||||
texturevpeg = polytop - h;
|
||||
|
|
|
@ -524,7 +524,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
if (linedef->flags & ML_EFFECT5 && !side->repeatcnt) { // "infinite" repeat
|
||||
texbottom = openbottom + side->rowoffset;
|
||||
textop = opentop + side->rowoffset;
|
||||
} else if (!!(linedef->flags & ML_DONTPEGBOTTOM) ^ !!(linedef->flags & ML_EFFECT3)) {
|
||||
} else if (linedef->flags & ML_EFFECT3) {
|
||||
texbottom = openbottom + side->rowoffset;
|
||||
textop = texbottom + texheight*(side->repeatcnt+1);
|
||||
} else {
|
||||
|
|
|
@ -5852,6 +5852,14 @@ static void P_ConvertBinaryMap(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < numlines; i++)
|
||||
{
|
||||
if (!!(lines[i].flags & ML_DONTPEGBOTTOM) ^ !!(lines[i].flags & ML_EFFECT3))
|
||||
lines[i].flags |= ML_EFFECT3;
|
||||
else
|
||||
lines[i].flags &= ~ML_EFFECT3;
|
||||
}
|
||||
}
|
||||
|
||||
/** Compute MD5 message digest for bytes read from memory source
|
||||
|
|
12
src/r_segs.c
12
src/r_segs.c
|
@ -345,7 +345,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
{
|
||||
dc_texturemid = ds->maskedtextureheight[dc_x];
|
||||
|
||||
if (!!(curline->linedef->flags & ML_DONTPEGBOTTOM) ^ !!(curline->linedef->flags & ML_EFFECT3))
|
||||
if (curline->linedef->flags & ML_EFFECT3)
|
||||
dc_texturemid += (textureheight[texnum])*times + textureheight[texnum];
|
||||
else
|
||||
dc_texturemid -= (textureheight[texnum])*times;
|
||||
|
@ -1455,9 +1455,9 @@ static void R_RenderSegLoop (void)
|
|||
maskedtexturecol[rw_x] = (INT16)texturecolumn;
|
||||
|
||||
if (maskedtextureheight != NULL) {
|
||||
maskedtextureheight[rw_x] = (!!(curline->linedef->flags & ML_DONTPEGBOTTOM) ^ !!(curline->linedef->flags & ML_EFFECT3) ?
|
||||
maskedtextureheight[rw_x] = (curline->linedef->flags & ML_EFFECT3) ?
|
||||
max(rw_midtexturemid, rw_midtextureback) :
|
||||
min(rw_midtexturemid, rw_midtextureback));
|
||||
min(rw_midtexturemid, rw_midtextureback);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2247,7 +2247,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
if (curline->polyseg)
|
||||
{ // use REAL front and back floors please, so midtexture rendering isn't mucked up
|
||||
rw_midtextureslide = rw_midtexturebackslide = 0;
|
||||
if (!!(linedef->flags & ML_DONTPEGBOTTOM) ^ !!(linedef->flags & ML_EFFECT3))
|
||||
if (linedef->flags & ML_EFFECT3)
|
||||
rw_midtexturemid = rw_midtextureback = max(curline->frontsector->floorheight, curline->backsector->floorheight) - viewz;
|
||||
else
|
||||
rw_midtexturemid = rw_midtextureback = min(curline->frontsector->ceilingheight, curline->backsector->ceilingheight) - viewz;
|
||||
|
@ -2258,13 +2258,13 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
if (linedef->flags & ML_EFFECT2)
|
||||
{ // Ignore slopes when texturing
|
||||
rw_midtextureslide = rw_midtexturebackslide = 0;
|
||||
if (!!(linedef->flags & ML_DONTPEGBOTTOM) ^ !!(linedef->flags & ML_EFFECT3))
|
||||
if (linedef->flags & ML_EFFECT3)
|
||||
rw_midtexturemid = rw_midtextureback = max(frontsector->floorheight, backsector->floorheight) - viewz;
|
||||
else
|
||||
rw_midtexturemid = rw_midtextureback = min(frontsector->ceilingheight, backsector->ceilingheight) - viewz;
|
||||
|
||||
}
|
||||
else if (!!(linedef->flags & ML_DONTPEGBOTTOM) ^ !!(linedef->flags & ML_EFFECT3))
|
||||
else if (linedef->flags & ML_EFFECT3)
|
||||
{
|
||||
rw_midtexturemid = worldbottom;
|
||||
rw_midtextureslide = floorfrontslide;
|
||||
|
|
Loading…
Reference in a new issue