From a5dacd4b12c397c112ae79c7e2fb90f940487a63 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 17 Sep 2019 03:20:30 +0000 Subject: [PATCH] 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 --- source/duke3d/src/player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 9d934cc13..f042cfc3b 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -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, §num); + hitscan(srcVect, sectnum, sintable[(shootAng + 512) & 2047], sintable[shootAng & 2047], zvel << 6, hitData, CLIPMASK1); pSprite->cstat |= cstatmask; return (hitData->sect < 0);