mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 11:21:11 +00:00
Interpolate shadows when scaling mobjs
This commit is contained in:
parent
2c689bae52
commit
3f5e7ff0d0
2 changed files with 4 additions and 0 deletions
|
@ -3606,6 +3606,8 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale)
|
|||
|
||||
scalemul = FixedMul(FRACUNIT - floordiff/640, scale);
|
||||
scalemul = FixedMul(scalemul, (thing->radius*2) / gpatch->height);
|
||||
if ((thing->scale != thing->old_scale) && (thing->scale >= FRACUNIT/1024)) // Interpolate shadows when scaling mobjs
|
||||
scalemul = FixedMul(scalemul, FixedDiv(interp.scale, thing->scale));
|
||||
|
||||
fscale = FIXED_TO_FLOAT(scalemul);
|
||||
fx = FIXED_TO_FLOAT(interp.x);
|
||||
|
|
|
@ -1324,6 +1324,8 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale,
|
|||
if (trans >= 9) return;
|
||||
|
||||
scalemul = FixedMul(FRACUNIT - floordiff/640, scale);
|
||||
if ((thing->scale != thing->old_scale) && (thing->scale >= FRACUNIT/1024)) // Interpolate shadows when scaling mobjs
|
||||
scalemul = FixedMul(scalemul, FixedDiv(interp.scale, thing->scale));
|
||||
|
||||
patch = W_CachePatchName("DSHADOW", PU_SPRITE);
|
||||
xscale = FixedDiv(projection, tz);
|
||||
|
|
Loading…
Reference in a new issue