mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- Blood: fixed 3 places where 3D distance was used but 2D should have been used.
This commit is contained in:
parent
cf5ba0886a
commit
32071c4460
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue