d_t_action OK (#172)

* d_t_action OK
This commit is contained in:
Elijah Thomas
2025-05-24 03:34:09 -04:00
committed by GitHub
parent b8b2375891
commit 9efc1e0ab9
9 changed files with 159 additions and 30 deletions
+2 -2
View File
@@ -431,8 +431,8 @@ bool dAcBase_c::getDistanceAndAngleToActor(
angleToActorX.set(cLib::targetAngleX(position, actor->position));
if ((distSquared <= distThresh * distThresh)) {
if ((labs(mAng(rotation.y.diff(angleToActorY))) <= yAngle) &&
(labs(mAng(rotation.x.diff(angleToActorX))) <= xAngle)) {
if (mAng::abs((s32)(rotation.y - angleToActorY)) <= yAngle &&
mAng::abs((s32)(rotation.x - angleToActorX)) <= xAngle) {
isWithinRange = true;
}
}