From a0231cf90cb546d65c1ec35db111270283215d8a Mon Sep 17 00:00:00 2001 From: pogokeen Date: Thu, 1 Aug 2019 00:08:05 +0000 Subject: [PATCH] polymost_scansector(): avoid using a culling method not designed for voxels when handling 1-sided wall aligned sprites that have voxel replacements git-svn-id: https://svn.eduke32.com/eduke32@7854 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index a9c81ab6b..cffd8a998 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -4971,9 +4971,13 @@ void polymost_scansector(int32_t sectnum) vec2_t const s = { spr->x-globalposx, spr->y-globalposy }; - if ((spr->cstat&48) || (usemodels && tile2model[spr->picnum].modelid>=0) || ((s.x * gcosang) + (s.y * gsinang) > 0)) + if ((spr->cstat&48) || + (usemodels && tile2model[spr->picnum].modelid>=0) || + ((s.x * gcosang) + (s.y * gsinang) > 0)) { - if ((spr->cstat&(64+48))!=(64+16) || dmulscale6(sintable[(spr->ang+512)&2047],-s.x, sintable[spr->ang&2047],-s.y) > 0) + if ((spr->cstat&(64+48))!=(64+16) || + (usevoxels && tiletovox[spr->picnum] >= 0 && voxmodels[tiletovox[spr->picnum]]) || + dmulscale6(sintable[(spr->ang+512)&2047],-s.x, sintable[spr->ang&2047],-s.y) > 0) if (renderAddTsprite(z, sectnum)) break; }