Blood: fix impact sprite OOB issue

This commit is contained in:
nukeykt 2021-07-26 16:34:16 +09:00 committed by Mitchell Richters
parent 1685890bc5
commit adb9547ba9

View file

@ -6096,7 +6096,10 @@ void actProcessSprites(void)
else if (sprite[gImpactSpritesList[i]].sectnum < 0 || (sprite[gImpactSpritesList[i]].flags & kHitagFree) != 0) else if (sprite[gImpactSpritesList[i]].sectnum < 0 || (sprite[gImpactSpritesList[i]].flags & kHitagFree) != 0)
continue; continue;
spritetype* pImpact = &sprite[gImpactSpritesList[i]]; XSPRITE* pXImpact = &xsprite[pImpact->extra]; spritetype* pImpact = &sprite[gImpactSpritesList[i]];
if (pImpact->extra <= 0)
continue;
XSPRITE* pXImpact = &xsprite[pImpact->extra];
if (/*pXImpact->state == pXImpact->restState ||*/ !TestBitString(v24c, pImpact->sectnum) || !CheckProximity(pImpact, x, y, z, nSector, radius)) if (/*pXImpact->state == pXImpact->restState ||*/ !TestBitString(v24c, pImpact->sectnum) || !CheckProximity(pImpact, x, y, z, nSector, radius))
continue; continue;