summaryrefslogtreecommitdiff
path: root/src/code/z_sub_s.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-03-02 19:16:00 -0500
committerGitHub <noreply@github.com>2023-03-02 21:16:00 -0300
commit5729b6d3f16aad52bf60bde988db681e204bb067 (patch)
tree14984c529f31dfd137407e01753eb1984ab501dd /src/code/z_sub_s.c
parent263fca77c30e1bd270a24633c9e786090738bbb1 (diff)
actor math cleanup (#1187)
Diffstat (limited to 'src/code/z_sub_s.c')
-rw-r--r--src/code/z_sub_s.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c
index 8f412364d..a792f3ce2 100644
--- a/src/code/z_sub_s.c
+++ b/src/code/z_sub_s.c
@@ -517,7 +517,7 @@ Actor* SubS_FindNearestActor(Actor* actor, PlayState* play, u8 actorCategory, s1
actorIter = actorTmp;
if (actorIter != actor) {
- dist = Actor_DistanceBetweenActors(actor, actorIter);
+ dist = Actor_WorldDistXYZToActor(actor, actorIter);
if (!isSetup || dist < minDist) {
closestActor = actorIter;
minDist = dist;
@@ -1522,7 +1522,7 @@ s32 func_8013E748(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, s32 ex
s32 SubS_ActorAndPlayerFaceEachOther(PlayState* play, Actor* actor, void* data) {
Player* player = GET_PLAYER(play);
Vec3s* yawTols = (Vec3s*)data;
- s16 playerYaw = ABS(BINANG_SUB(Actor_YawBetweenActors(&player->actor, actor), player->actor.shape.rot.y));
+ s16 playerYaw = ABS(BINANG_SUB(Actor_WorldYawTowardActor(&player->actor, actor), player->actor.shape.rot.y));
s16 actorYaw = ABS(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
s32 areFacing = false;
s32 actorYawTol = ABS(yawTols->y);