From 87b136eb797af2cb93d74df4ccc4b3b5c556902c Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 25 Jun 2019 11:28:44 +0000 Subject: [PATCH] Fix bug with sprite heights and autoaim targeting git-svn-id: https://svn.eduke32.com/eduke32@7702 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 79add1588..83e2f0588 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -300,9 +300,9 @@ static int A_FindTargetSprite(const spritetype *pSprite, int projAng, int projec } #ifndef EDUKE32_STANDALONE - int const zOffset = IONMAIDEN ? 0 : (PN(spriteNum) == ORGANTIC || PN(spriteNum) == ROTATEGUN) ? 0 : ZOFFSET5; + int const zOffset = (!IONMAIDEN && (PN(spriteNum) == ORGANTIC || PN(spriteNum) == ROTATEGUN)) ? 0 : ZOFFSET5; #else - int const zOffset = 0; + int const zOffset = ZOFFSET5; #endif int const canSee = cansee(SX(spriteNum), SY(spriteNum), SZ(spriteNum) - zOffset, SECT(spriteNum), pSprite->x, pSprite->y, pSprite->z - ZOFFSET5, pSprite->sectnum);