Fix shadows under hiresscale characters

This commit is contained in:
fickleheart 2020-01-08 23:33:43 -06:00
parent 9e8d20504e
commit 7d2402ac62

View file

@ -1285,6 +1285,8 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale,
shadow->gzt = shadow->pz + shadow->patch->height * shadowyscale / 2; shadow->gzt = shadow->pz + shadow->patch->height * shadowyscale / 2;
shadow->gz = shadow->gzt - shadow->patch->height * shadowyscale; shadow->gz = shadow->gzt - shadow->patch->height * shadowyscale;
shadow->texturemid = FixedMul(thing->scale, FixedDiv(shadow->gzt - viewz, shadowyscale)); shadow->texturemid = FixedMul(thing->scale, FixedDiv(shadow->gzt - viewz, shadowyscale));
if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES)
shadow->texturemid = FixedMul(shadow->texturemid, ((skin_t *)thing->skin)->highresscale);
shadow->scalestep = 0; shadow->scalestep = 0;
shadow->shear.tan = shadowskew; // repurposed variable shadow->shear.tan = shadowskew; // repurposed variable