Do not target teammates (#187)

This commit is contained in:
CommonLoon102 2019-09-22 16:17:06 +00:00 committed by Christoph Oelckers
parent a9fcee742d
commit c2e8cc6607

View file

@ -325,6 +325,8 @@ void UpdateAimVector(PLAYER * pPlayer)
pSprite = &sprite[nSprite];
if (pSprite == pPSprite)
continue;
if (!gGameOptions.bFriendlyFire && IsTargetTeammate(pPlayer, pSprite))
continue;
if (pSprite->hitag&32)
continue;
if (!(pSprite->hitag&8))
@ -379,6 +381,8 @@ void UpdateAimVector(PLAYER * pPlayer)
for (nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
{
pSprite = &sprite[nSprite];
if (!gGameOptions.bFriendlyFire && IsTargetTeammate(pPlayer, pSprite))
continue;
if (!(pSprite->hitag&8))
continue;
int x2 = pSprite->x;