From a7921e4c01ece5aa8b9e4f7d7632bb654f8803d5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 May 2021 14:04:57 +0200 Subject: [PATCH] - use the same formula as Duke to offset SW's shadows in Polymost. --- source/games/sw/src/draw.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index f9f0f6647..c4767594a 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -351,10 +351,10 @@ DoShadows(spritetype* tsprite, int& spritesortcnt, tspriteptr_t tsp, int viewz, } else if (!testnewrenderer) { - int const camang = mirror ? NORM_ANGLE(2048 - Player[screenpeek].siang) : Player[screenpeek].siang; - New->x += bcos(camang, -11); - New->y += bsin(camang, -11); - + // Alter the shadow's position so that it appears behind the sprite itself. + int look = getangle(New->x - Player[screenpeek].six, New->y - Player[screenpeek].siy); + New->x += bcos(look, -9); + New->y += bsin(look, -9); } else New->time = 1;