Optimize for when wall_scalex == 1.0

This commit is contained in:
Lactozilla 2024-01-08 22:08:50 -03:00
parent 159307c552
commit 28c30a9294

View file

@ -737,8 +737,16 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
thicksidecol = ffloortexturecolumn;
for (INT32 x = x1; x <= x2; x++)
thicksidecol[x] = FixedDiv(ds->thicksidecol[x], wall_scalex) + ds->offsetx;
if (wall_scalex == FRACUNIT)
{
for (INT32 x = x1; x <= x2; x++)
thicksidecol[x] = ds->thicksidecol[x] + ds->offsetx;
}
else
{
for (INT32 x = x1; x <= x2; x++)
thicksidecol[x] = FixedDiv(ds->thicksidecol[x], wall_scalex) + ds->offsetx;
}
mfloorclip = ds->sprbottomclip;
mceilingclip = ds->sprtopclip;