mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: Use getPosWithOffsetZ()
in a few places.
This commit is contained in:
parent
4a6e2683f2
commit
4848a844af
2 changed files with 2 additions and 6 deletions
|
@ -345,9 +345,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
continue;
|
||||
}
|
||||
|
||||
if (act2->spr.picnum == APLAYER) act2->spr.pos.Z -= gs.playerheight;
|
||||
double dist = (actor->spr.pos - act2->spr.pos).Length();
|
||||
if (act2->spr.picnum == APLAYER) act2->spr.pos.Z += gs.playerheight;
|
||||
double dist = (actor->getPosWithOffsetZ() - act2->spr.pos).Length();
|
||||
|
||||
if (dist < radius && cansee(act2->spr.pos.plusZ(-8), act2->sector(), actor->spr.pos.plusZ(-12), actor->sector()))
|
||||
{
|
||||
|
|
|
@ -292,9 +292,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
continue;
|
||||
}
|
||||
|
||||
if (act2->spr.picnum == APLAYER) act2->spr.pos.Z -= gs.playerheight;
|
||||
double dist = (actor->spr.pos - act2->spr.pos).Length();
|
||||
if (act2->spr.picnum == APLAYER) act2->spr.pos.Z += gs.playerheight;
|
||||
double dist = (actor->getPosWithOffsetZ() - act2->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