From b42b9de2a26de4710cb55e4949985ddaccf36bfa Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 16 Mar 2023 11:23:05 +1100 Subject: [PATCH] Revert "- SW: Tune shadow drawing code so that it by default uses the sector's interpolated floorz when possible." This reverts commit 3271c2011ee97291312fd88a36ac7a338b23bf44. * Fixes #884 * Fixes #892 --- source/games/sw/src/draw.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index fcc785b58..77285d94b 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -312,10 +312,13 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz) scale = tsp->scale; } - loz = DoShadowFindGroundPoint(tsp); - if (ownerActor->user.lowActor && (ownerActor->user.lowActor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR))) + loz = ownerActor->user.loz; + if (ownerActor->user.lowActor) { - loz = ownerActor->user.loz; + if (!(ownerActor->user.lowActor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR))) + { + loz = DoShadowFindGroundPoint(tsp); + } } // need to find the ground here