- Blood: fixed 3 places where 3D distance was used but 2D should have been used.

This commit is contained in:
Christoph Oelckers 2022-12-17 18:42:55 +01:00
parent cf5ba0886a
commit 32071c4460
2 changed files with 3 additions and 3 deletions

View file

@ -1495,7 +1495,7 @@ void aiThinkTarget(DBloodActor* actor)
if (actor->GetOwner() == pPlayer->actor || pPlayer->actor->xspr.health == 0 || powerupCheck(pPlayer, kPwUpShadowCloak) > 0)
continue;
auto ppos = pPlayer->actor->spr.pos;
auto dvec = ppos - actor->spr.pos.XY();
auto dvec = ppos.XY() - actor->spr.pos.XY();
auto pSector = pPlayer->actor->sector();
double nDist = dvec.Length();
@ -1540,7 +1540,7 @@ void aiLookForTarget(DBloodActor* actor)
if (actor->GetOwner() == pPlayer->actor || pPlayer->actor->xspr.health == 0 || powerupCheck(pPlayer, kPwUpShadowCloak) > 0)
continue;
auto ppos = pPlayer->actor->spr.pos;
auto dvec = ppos - actor->spr.pos.XY();
auto dvec = ppos.XY() - actor->spr.pos.XY();
auto pSector = pPlayer->actor->sector();
double nDist = dvec.Length();

View file

@ -98,7 +98,7 @@ static void batThinkTarget(DBloodActor* actor)
if (pPlayer->actor->xspr.health == 0 || powerupCheck(pPlayer, kPwUpShadowCloak) > 0)
continue;
auto ppos = pPlayer->actor->spr.pos;
auto dvec = ppos - actor->spr.pos.XY();
auto dvec = ppos.XY() - actor->spr.pos.XY();
auto pSector = pPlayer->actor->sector();
double nDist = dvec.Length();