mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Limit shadow Y scale to prevent graphical bugs
This commit is contained in:
parent
cfb9b3c234
commit
9e101fc2bb
1 changed files with 4 additions and 2 deletions
|
@ -1247,8 +1247,10 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale,
|
|||
patch = W_CachePatchName("DSHADOW", PU_CACHE);
|
||||
xscale = FixedDiv(projection, tz);
|
||||
yscale = FixedDiv(projectiony, tz);
|
||||
shadowxscale = FixedMul(thing->radius*2, scalemul) / patch->width;
|
||||
shadowyscale = FixedMul(FixedMul(thing->radius*2 / patch->height, scalemul), FixedDiv(abs(floorz - viewz), tz));
|
||||
shadowxscale = FixedMul(thing->radius*2, scalemul);
|
||||
shadowyscale = FixedMul(FixedMul(thing->radius*2, scalemul), FixedDiv(abs(floorz - viewz), tz));
|
||||
shadowyscale = min(shadowyscale, shadowxscale) / patch->height;
|
||||
shadowxscale /= patch->width;
|
||||
shadowskew = 0;
|
||||
|
||||
if (floorslope)
|
||||
|
|
Loading…
Reference in a new issue