From 986e34c03664274d29c0fc9af07636e78ad2d997 Mon Sep 17 00:00:00 2001 From: engineer124 Date: Wed, 25 Oct 2023 12:50:39 +1100 Subject: [PATCH] cleanup --- src/code/z_eff_tire_mark.c | 4 ++-- src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/code/z_eff_tire_mark.c b/src/code/z_eff_tire_mark.c index 5e8781a84..6747fbc98 100644 --- a/src/code/z_eff_tire_mark.c +++ b/src/code/z_eff_tire_mark.c @@ -57,8 +57,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f sp48.y = spB8.y; sp48.z = spB8.z; - if ((Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) && - (Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) { + if (Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) && + Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30)) { if (!(spAC->flags & 2)) { spAC->flags |= 1; } diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c index a04c76f49..28d9f818e 100644 --- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c +++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c @@ -154,11 +154,11 @@ s32 EnMttag_GetCurrentCheckpoint(Actor* actor, PlayState* play, s32* upcomingChe // Iterates through all possible checkpoints that are associated with this sceneExitIndex. do { - if ((Math3D_PointDistSqToLine2DImpl( + if (Math3D_PointDistSqToLine2DImpl( actor->world.pos.x, actor->world.pos.z, (&sCheckpointPositions[checkpointIterator])[-1].x, (&sCheckpointPositions[checkpointIterator])[-1].z, (&sCheckpointPositions[checkpointIterator])[1].x, (&sCheckpointPositions[checkpointIterator])[1].z, &perpendicularPointX, &perpendicularPointZ, - &lineLenSq)) && + &lineLenSq) && (!hasSetCurrentCheckpointOnce || ((curentCheckpoint + 1) == checkpointIterator) || (lineLenSq < minLineLengthSq))) { minLineLengthSq = lineLenSq;