From 3271c2011ee97291312fd88a36ac7a338b23bf44 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 8 Jan 2023 23:03:22 +1100 Subject: [PATCH] - SW: Tune shadow drawing code so that it by default uses the sector's interpolated floorz when possible. * Partially addresses #845. --- source/games/sw/src/draw.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 3e6ae490c..1d5e7d45b 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -312,13 +312,10 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz) scale = tsp->scale; } - loz = ownerActor->user.loz; - if (ownerActor->user.lowActor) + loz = DoShadowFindGroundPoint(tsp); + if (ownerActor->user.lowActor && (ownerActor->user.lowActor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR))) { - if (!(ownerActor->user.lowActor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR))) - { - loz = DoShadowFindGroundPoint(tsp); - } + loz = ownerActor->user.loz; } // need to find the ground here