From fe0a10ed29ad5572ec2a58261cc9d0a6b67c45a0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 12 Sep 2022 18:33:03 +0200 Subject: [PATCH] - handle neartag calls in checksectors. --- source/games/duke/src/sectors_d.cpp | 10 +++++----- source/games/duke/src/sectors_r.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/games/duke/src/sectors_d.cpp b/source/games/duke/src/sectors_d.cpp index 3bc9597bf..cf562887e 100644 --- a/source/games/duke/src/sectors_d.cpp +++ b/source/games/duke/src/sectors_d.cpp @@ -1580,17 +1580,17 @@ void checksectors_d(int snum) return; } if (p->newOwner != nullptr) - neartag({ p->player_int_opos().X, p->player_int_opos().Y, p->player_int_opos().Z }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280L, 1); + neartag(p->opos, p->GetActor()->sector(), p->angle.oang, near, 80., 1); else { - neartag(p->player_int_pos(), p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 1); + neartag(p->pos, p->GetActor()->sector(), p->angle.oang, near, 80., 1); if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr) - neartag({ p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + (8 << 8) }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 1); + neartag(p->pos.plusZ(8), p->GetActor()->sector(), p->angle.oang, near, 80., 1); if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr) - neartag({ p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 1); + neartag(p->pos.plusZ(16), p->GetActor()->sector(), p->angle.oang, near, 80., 1); if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr) { - neartag({ p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 3); + neartag(p->pos.plusZ(16), p->GetActor()->sector(), p->angle.oang, near, 80., 3); if (near.actor() != nullptr) { switch (near.actor()->spr.picnum) diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index 302a631e8..afde5a472 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -2525,21 +2525,21 @@ void checksectors_r(int snum) } return; } - neartag(p->player_int_pos(), p->GetActor()->sector(), p->angle.oang.Buildang(), near , 1280, 3); + neartag(p->pos, p->GetActor()->sector(), p->angle.oang, near , 80., 3); } if (p->newOwner != nullptr) - neartag({ p->player_int_opos().X, p->player_int_opos().Y, p->player_int_opos().Z }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280L, 1); + neartag(p->opos, p->GetActor()->sector(), p->angle.oang, near, 80., 1); else { - neartag(p->player_int_pos(), p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 1); + neartag(p->pos, p->GetActor()->sector(), p->angle.oang, near, 80., 1); if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr) - neartag({ p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + (8 << 8) }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 1); + neartag(p->pos.plusZ(8), p->GetActor()->sector(), p->angle.oang, near, 80., 1); if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr) - neartag({ p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 1); + neartag(p->pos.plusZ(16), p->GetActor()->sector(), p->angle.oang, near, 80., 1); if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr) { - neartag({ p->player_int_pos().X, p->player_int_pos().Y, p->player_int_pos().Z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.Buildang(), near, 1280, 3); + neartag(p->pos.plusZ(16), p->GetActor()->sector(), p->angle.oang, near, 80., 3); if (near.actor() != nullptr) { switch (near.actor()->spr.picnum)