- Exhumed: Fix incorrect distance check operator for the rat.

This commit is contained in:
Mitchell Richters 2023-04-25 18:39:56 +10:00
parent fe356f3183
commit 7c2bd266b9

View file

@ -260,7 +260,7 @@ void AIRat::Tick(RunListEvent* ev)
auto delta = pActor->spr.pos.XY() - pTarget->spr.pos.XY();
if (abs(delta.X) > CHECK_DIST || abs(delta.Y) >= CHECK_DIST)
if (abs(delta.X) > CHECK_DIST || abs(delta.Y) > CHECK_DIST)
{
pActor->nAction = 2;
pActor->nFrame = 0;
@ -318,7 +318,7 @@ void AIRat::Tick(RunListEvent* ev)
auto delta = pActor->spr.pos.XY() - pTarget->spr.pos.XY();
if (abs(delta.X) > CHECK_DIST || abs(delta.Y) >= CHECK_DIST)
if (abs(delta.X) > CHECK_DIST || abs(delta.Y) > CHECK_DIST)
{
pActor->nCount--;
if (pActor->nCount < 0)