Fix bug dating back to the DOS version where actors on sector lines would sometimes fail to shoot hitscan projectiles

git-svn-id: https://svn.eduke32.com/eduke32@8107 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-09-17 03:20:30 +00:00 committed by Christoph Oelckers
parent 8f347bde0b
commit a5dacd4b12

View file

@ -554,7 +554,9 @@ static int Proj_DoHitscan(int spriteNum, int32_t const cstatmask, const vec3_t *
pSprite->cstat &= ~cstatmask;
zvel = A_GetShootZvel(zvel);
hitscan(srcVect, pSprite->sectnum, sintable[(shootAng + 512) & 2047], sintable[shootAng & 2047], zvel << 6, hitData, CLIPMASK1);
int16_t sectnum = pSprite->sectnum;
updatesector(srcVect->x, srcVect->y, &sectnum);
hitscan(srcVect, sectnum, sintable[(shootAng + 512) & 2047], sintable[shootAng & 2047], zvel << 6, hitData, CLIPMASK1);
pSprite->cstat |= cstatmask;
return (hitData->sect < 0);