mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- fixed bad hitradius distance calculation.
Player offset was retrieved from the wrong actor here.
This commit is contained in:
parent
fba882e368
commit
cd28c818b0
2 changed files with 2 additions and 2 deletions
|
@ -303,7 +303,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
continue;
|
||||
}
|
||||
|
||||
double dist = (actor->getPosWithOffsetZ() - act2->spr.pos).Length();
|
||||
double dist = (act2->getPosWithOffsetZ() - actor->spr.pos).Length();
|
||||
|
||||
if (dist < radius && cansee(act2->spr.pos.plusZ(-8), act2->sector(), actor->spr.pos.plusZ(-12), actor->sector()))
|
||||
{
|
||||
|
|
|
@ -243,7 +243,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
continue;
|
||||
}
|
||||
|
||||
double dist = (actor->getPosWithOffsetZ() - act2->spr.pos).Length();
|
||||
double dist = (act2->getPosWithOffsetZ() - actor->spr.pos).Length();
|
||||
|
||||
if (dist < radius && cansee(act2->spr.pos.plusZ(-8), act2->sector(), actor->spr.pos.plusZ(-12), actor->sector()))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue