- Blood: don't crash when cultists accidentally target themselves.

This commit is contained in:
Christoph Oelckers 2021-12-21 12:00:01 +01:00
parent 785c7d4ceb
commit 156369ac8a

View file

@ -280,7 +280,7 @@ static void cultThinkChase(DBloodActor* actor)
return;
}
int nDist = approxDist(dx, dy);
if (nDist <= pDudeInfo->seeDist)
if (nDist > 0 && nDist <= pDudeInfo->seeDist)
{
int nDeltaAngle = ((getangle(dx, dy) + 1024 - pSprite->ang) & 2047) - 1024;
int height = (pDudeInfo->eyeHeight * pSprite->yrepeat) << 2;