- use the same formula as Duke to offset SW's shadows in Polymost.

This commit is contained in:
Christoph Oelckers 2021-05-29 14:04:57 +02:00
parent 39b84c4063
commit a7921e4c01

View file

@ -351,10 +351,10 @@ DoShadows(spritetype* tsprite, int& spritesortcnt, tspriteptr_t tsp, int viewz,
} }
else if (!testnewrenderer) else if (!testnewrenderer)
{ {
int const camang = mirror ? NORM_ANGLE(2048 - Player[screenpeek].siang) : Player[screenpeek].siang; // Alter the shadow's position so that it appears behind the sprite itself.
New->x += bcos(camang, -11); int look = getangle(New->x - Player[screenpeek].six, New->y - Player[screenpeek].siy);
New->y += bsin(camang, -11); New->x += bcos(look, -9);
New->y += bsin(look, -9);
} }
else New->time = 1; else New->time = 1;