- reformatted the actor and ai sources.

This commit is contained in:
Christoph Oelckers 2021-09-16 21:59:39 +02:00
parent 0ee81b2bb8
commit c485fce958
21 changed files with 7350 additions and 7349 deletions

View file

@ -227,6 +227,7 @@ static void spidThinkChase(DBloodActor* actor)
if (nDist <= pDudeInfo->seeDist) { if (nDist <= pDudeInfo->seeDist) {
int nDeltaAngle = ((getangle(dx, dy) + 1024 - pSprite->ang) & 2047) - 1024; int nDeltaAngle = ((getangle(dx, dy) + 1024 - pSprite->ang) & 2047) - 1024;
int height = (pDudeInfo->eyeHeight * pSprite->yrepeat) << 2; int height = (pDudeInfo->eyeHeight * pSprite->yrepeat) << 2;
if (cansee(pTarget->x, pTarget->y, pTarget->z, pTarget->sectnum, pSprite->x, pSprite->y, pSprite->z - height, pSprite->sectnum)) { if (cansee(pTarget->x, pTarget->y, pTarget->z, pTarget->sectnum, pSprite->x, pSprite->y, pSprite->z - height, pSprite->sectnum)) {
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery) { if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery) {
aiSetTarget(actor, actor->GetTarget()); aiSetTarget(actor, actor->GetTarget());