mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
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:
parent
41ed560c45
commit
e8b042899b
1 changed files with 4 additions and 2 deletions
|
@ -372,9 +372,11 @@ static int GetAutoAimAng(int spriteNum, int playerNum, int projecTile, int zAdju
|
||||||
|
|
||||||
#ifndef EDUKE32_STANDALONE
|
#ifndef EDUKE32_STANDALONE
|
||||||
if (aimFlags &&
|
if (aimFlags &&
|
||||||
((pSprite->picnum >= GREENSLIME && pSprite->picnum <= GREENSLIME + 7) || pSprite->picnum == ROTATEGUN))
|
((pSprite->picnum >= GREENSLIME && pSprite->picnum <= GREENSLIME + 7) || pSprite->picnum == ROTATEGUN || pSprite->cstat & CSTAT_SPRITE_YCENTER))
|
||||||
zCenter -= ZOFFSET3;
|
#else
|
||||||
|
if (aimFlags && pSprite->cstat & CSTAT_SPRITE_YCENTER)
|
||||||
#endif
|
#endif
|
||||||
|
zCenter -= ZOFFSET3;
|
||||||
|
|
||||||
int spriteDist = safeldist(g_player[playerNum].ps->i, &sprite[returnSprite]);
|
int spriteDist = safeldist(g_player[playerNum].ps->i, &sprite[returnSprite]);
|
||||||
*pZvel = tabledivide32_noinline((pSprite->z - startPos->z - zCenter) * projVel, spriteDist);
|
*pZvel = tabledivide32_noinline((pSprite->z - startPos->z - zCenter) * projVel, spriteDist);
|
||||||
|
|
Loading…
Reference in a new issue