Don't check clip objects for sprites in the keepaway() loop in clipmove()

This prevents some hilarious issues with deadly wall decorations. The "side blocker" clip lines that already exist for these sprites should already prevent the kinds of clipping issues this loop is intended to address, anyway.

git-svn-id: https://svn.eduke32.com/eduke32@7835 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-07-24 10:56:24 +00:00 committed by Christoph Oelckers
parent dad28df269
commit 4beaeb5426

View file

@ -1336,9 +1336,12 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
{ {
for (native_t i=clipnum-1;i>=0;--i) for (native_t i=clipnum-1;i>=0;--i)
{ {
if (clipinsideboxline(pos->x, pos->y, clipit[i].x1, clipit[i].y1, clipit[i].x2, clipit[i].y2, walldist)) if ((clipobjectval[i] & 49152) != 49152 && clipinsidebox(&pos->vec2, clipobjectval[i] & (MAXWALLS-1), walldist))
{ {
vec2_t const vec = pos->vec2;
keepaway(&pos->x, &pos->y, i); keepaway(&pos->x, &pos->y, i);
if (inside(pos->x,pos->y, *sectnum) != 1)
pos->vec2 = vec;
break; break;
} }
} }