From 600648939afe0e7d5c26c6448ddd87edfe9c6dbd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 25 Sep 2022 10:57:46 +0200 Subject: [PATCH] - removed some unnecessary distance checks. These are the same as the specified max distance and redundant. --- source/games/sw/src/ai.cpp | 2 +- source/games/sw/src/track.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 612b4873e..c0d838d00 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -435,7 +435,7 @@ int DoActorOperate(DSWActor* actor) neartag(actor->spr.pos.plusZ(z[i]), actor->sector(), actor->spr.angle, near, 64., NT_Lotag | NT_Hitag | NT_NoSpriteCheck); } - if (near.hitSector != nullptr && near.hitpos.X < 64) + if (near.hitSector != nullptr) { if (OperateSector(near.hitSector, false)) { diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 31c139501..ad4bed574 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -3041,7 +3041,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor) { neartag(DVector3(actor->spr.pos.XY(), zz), actor->sector(), actor->spr.angle, near, 64., NT_Lotag | NT_Hitag); - if (near.actor() != nullptr && near.hitpos.X < 64) + if (near.actor() != nullptr) { if (OperateSprite(near.actor(), false)) { @@ -3055,7 +3055,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor) } } - if (near.hitSector != nullptr && near.hitpos.X < 64) + if (near.hitSector != nullptr) { if (OperateSector(near.hitSector, false)) {