- floatified ratThinkChase

This commit is contained in:
Christoph Oelckers 2022-09-27 22:39:35 +02:00
parent edf6c69159
commit 2620a8f644

View file

@ -99,14 +99,14 @@ static void ratThinkChase(DBloodActor* actor)
if (nDist <= pDudeInfo->SeeDist())
{
int nDeltaAngle = getincangle(actor->int_ang(), nAngle.Buildang());
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
{
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x399 && abs(nDeltaAngle) < 85)
if (nDist < 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &ratBite);
return;
}