Apply the same autoaim Z position offsetting logic used on GREENSLIME and ROTATEGUN to any sprite with CSTAT_SPRITE_YCENTER set

git-svn-id: https://svn.eduke32.com/eduke32@6971 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-09-01 19:36:01 +00:00
parent 41ed560c45
commit e8b042899b

View file

@ -372,9 +372,11 @@ static int GetAutoAimAng(int spriteNum, int playerNum, int projecTile, int zAdju
#ifndef EDUKE32_STANDALONE
if (aimFlags &&
((pSprite->picnum >= GREENSLIME && pSprite->picnum <= GREENSLIME + 7) || pSprite->picnum == ROTATEGUN))
zCenter -= ZOFFSET3;
((pSprite->picnum >= GREENSLIME && pSprite->picnum <= GREENSLIME + 7) || pSprite->picnum == ROTATEGUN || pSprite->cstat & CSTAT_SPRITE_YCENTER))
#else
if (aimFlags && pSprite->cstat & CSTAT_SPRITE_YCENTER)
#endif
zCenter -= ZOFFSET3;
int spriteDist = safeldist(g_player[playerNum].ps->i, &sprite[returnSprite]);
*pZvel = tabledivide32_noinline((pSprite->z - startPos->z - zCenter) * projVel, spriteDist);