From 364b41bd550742f5ba2a19b78d9822c1b2ef9962 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 2 Feb 2020 06:41:25 +0000 Subject: [PATCH] SW: Clamp tsprz of Bouncing Betty mines to their floorz if beneath the floor This fixes their invisibility in Polymost. git-svn-id: https://svn.eduke32.com/eduke32@8597 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/draw.cpp --- source/sw/src/draw.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index dac8c6140..52fbb4d86 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -750,6 +750,15 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror) } } + // workaround for mines beneath the floor + if (tsp->picnum == BETTY_R0) + { + auto sp = (uspriteptr_t)&sprite[SpriteNum]; + int32_t const floorz = getflorzofslope(sp->sectnum, sp->x, sp->y); + if (sp->z > floorz) + tsp->z = floorz; + } + if (r_shadows && TEST(tu->Flags, SPR_SHADOW)) { DoShadows(tsp, viewz);