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
This commit is contained in:
hendricks266 2020-02-02 06:41:25 +00:00 committed by Christoph Oelckers
parent df36f27b32
commit 364b41bd55

View file

@ -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);