mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 13:21:20 +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;
|
||||
|
||||
clipmidtex = (ldef->flags & ML_CLIPMIDTEX) || (sidedef->flags & SIDEFLAG_CLIP_MIDTEX);
|
||||
texture_height = FixedDiv(textureheight[texnum], wall_scaley);
|
||||
texture_height = textureheight[texnum];
|
||||
|
||||
if (sidedef->repeatcnt)
|
||||
repeats = 1 + sidedef->repeatcnt;
|
||||
|
@ -287,6 +287,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
{
|
||||
fixed_t high, low;
|
||||
|
||||
height = FixedDiv(texture_height, wall_scaley);
|
||||
|
||||
if (front->ceilingheight > back->ceilingheight)
|
||||
high = back->ceilingheight;
|
||||
else
|
||||
|
@ -297,8 +299,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
else
|
||||
low = back->floorheight;
|
||||
|
||||
repeats = (high - low)/texture_height;
|
||||
if ((high-low)%texture_height)
|
||||
repeats = (high - low)/height;
|
||||
if ((high-low)%height)
|
||||
repeats++; // tile an extra time to fill the gap -- Monster Iestyn
|
||||
}
|
||||
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
|
||||
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];
|
||||
|
||||
if (ldef->flags & ML_MIDPEG)
|
||||
dc_texturemid += (textureheight[texnum])*times + textureheight[texnum];
|
||||
dc_texturemid += texture_height*times + texture_height;
|
||||
else
|
||||
dc_texturemid -= (textureheight[texnum])*times;
|
||||
dc_texturemid -= texture_height*times;
|
||||
|
||||
// Check for overflows first
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS);
|
||||
|
|
Loading…
Reference in a new issue