From 2620a8f644df1365357472b157939f6fab1c3091 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 27 Sep 2022 22:39:35 +0200 Subject: [PATCH] - floatified ratThinkChase --- source/games/blood/src/airat.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/blood/src/airat.cpp b/source/games/blood/src/airat.cpp index da40ef293..f55a4a393 100644 --- a/source/games/blood/src/airat.cpp +++ b/source/games/blood/src/airat.cpp @@ -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; }