mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Fix regression
This commit is contained in:
parent
509a4a5c23
commit
62a50c21cb
1 changed files with 8 additions and 6 deletions
14
src/r_segs.c
14
src/r_segs.c
|
@ -279,7 +279,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
back = backsector;
|
back = backsector;
|
||||||
|
|
||||||
clipmidtex = (ldef->flags & ML_CLIPMIDTEX) || (sidedef->flags & SIDEFLAG_CLIP_MIDTEX);
|
clipmidtex = (ldef->flags & ML_CLIPMIDTEX) || (sidedef->flags & SIDEFLAG_CLIP_MIDTEX);
|
||||||
texture_height = FixedDiv(textureheight[texnum], wall_scaley);
|
texture_height = textureheight[texnum];
|
||||||
|
|
||||||
if (sidedef->repeatcnt)
|
if (sidedef->repeatcnt)
|
||||||
repeats = 1 + sidedef->repeatcnt;
|
repeats = 1 + sidedef->repeatcnt;
|
||||||
|
@ -287,6 +287,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
{
|
{
|
||||||
fixed_t high, low;
|
fixed_t high, low;
|
||||||
|
|
||||||
|
height = FixedDiv(texture_height, wall_scaley);
|
||||||
|
|
||||||
if (front->ceilingheight > back->ceilingheight)
|
if (front->ceilingheight > back->ceilingheight)
|
||||||
high = back->ceilingheight;
|
high = back->ceilingheight;
|
||||||
else
|
else
|
||||||
|
@ -297,8 +299,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
else
|
else
|
||||||
low = back->floorheight;
|
low = back->floorheight;
|
||||||
|
|
||||||
repeats = (high - low)/texture_height;
|
repeats = (high - low)/height;
|
||||||
if ((high-low)%texture_height)
|
if ((high-low)%height)
|
||||||
repeats++; // tile an extra time to fill the gap -- Monster Iestyn
|
repeats++; // tile an extra time to fill the gap -- Monster Iestyn
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -346,7 +348,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dc_texheight = textureheight[texnum]>>FRACBITS;
|
dc_texheight = texture_height>>FRACBITS;
|
||||||
|
|
||||||
// draw the columns
|
// draw the columns
|
||||||
for (dc_x = x1; dc_x <= x2; dc_x++)
|
for (dc_x = x1; dc_x <= x2; dc_x++)
|
||||||
|
@ -354,9 +356,9 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
dc_texturemid = ds->maskedtextureheight[dc_x];
|
dc_texturemid = ds->maskedtextureheight[dc_x];
|
||||||
|
|
||||||
if (ldef->flags & ML_MIDPEG)
|
if (ldef->flags & ML_MIDPEG)
|
||||||
dc_texturemid += (textureheight[texnum])*times + textureheight[texnum];
|
dc_texturemid += texture_height*times + texture_height;
|
||||||
else
|
else
|
||||||
dc_texturemid -= (textureheight[texnum])*times;
|
dc_texturemid -= texture_height*times;
|
||||||
|
|
||||||
// Check for overflows first
|
// Check for overflows first
|
||||||
overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS);
|
overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS);
|
||||||
|
|
Loading…
Reference in a new issue