do tx checking after tz clamping, not before

This commit is contained in:
Monster Iestyn 2020-05-19 18:43:33 +01:00
parent 12e1094143
commit 35e5d673e0

View file

@ -1582,9 +1582,6 @@ static void R_ProjectSprite(mobj_t *thing)
if (max(tz, tz2) < FixedMul(MINZ, this_scale)) // non-papersprite clipping is handled earlier
return;
if (tx2 < -(tz2<<2) || tx > tz<<2) // too far off the side?
return;
// Needs partially clipped
if (tz < FixedMul(MINZ, this_scale))
{
@ -1603,6 +1600,9 @@ static void R_ProjectSprite(mobj_t *thing)
xscale2 = FixedDiv(projection, tz2);
}
if (tx2 < -(tz2<<2) || tx > tz<<2) // too far off the side?
return;
// TODO: tx clamping
x1 = (centerxfrac + FixedMul(tx,xscale))>>FRACBITS;