SW: fix shadow size math.

This commit is contained in:
Christoph Oelckers 2024-10-20 08:36:35 +02:00
parent e48911dcc9
commit c6f1990495

View file

@ -347,8 +347,8 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz)
ground_dist = int(abs(loz - GetSpriteZOfBottom(tsp)) * (1./16)); ground_dist = int(abs(loz - GetSpriteZOfBottom(tsp)) * (1./16));
double scaleofs = (ground_dist - view_dist) * REPEAT_SCALE; double scaleofs = (ground_dist - view_dist) * REPEAT_SCALE;
scale.X = clamp(scale.X + scaleofs, 0.0625, 4.); scale.X = clamp(scale.X - scaleofs, 0.0625, 4.);
scale.Y = clamp(scale.Y + scaleofs, 0.0625, 4.); scale.Y = clamp(scale.Y - scaleofs, 0.0625, 4.);
tSpr->scale = scale; tSpr->scale = scale;
if (tilehasmodelorvoxel(tsp->spritetexture(), tsp->pal)) if (tilehasmodelorvoxel(tsp->spritetexture(), tsp->pal))