From 0efd9ef21ae78ae75e70624e034db50ee8af230e Mon Sep 17 00:00:00 2001 From: Blockyyy <88585273+Blockyyy@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:15:29 +0200 Subject: [PATCH] Recovery Heart (#360) changes nearest_mario_state_to_object to nearest_interacting_mario_state_to_object --- src/game/behaviors/recovery_heart.inc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/behaviors/recovery_heart.inc.c b/src/game/behaviors/recovery_heart.inc.c index ef312b5d4..1dcb0de6f 100644 --- a/src/game/behaviors/recovery_heart.inc.c +++ b/src/game/behaviors/recovery_heart.inc.c @@ -27,7 +27,7 @@ void bhv_recovery_heart_loop(void) { o->oSpinningHeartPlayedSound += 1; } - struct MarioState* marioState = nearest_mario_state_to_object(o); + struct MarioState* marioState = nearest_interacting_mario_state_to_object(o); if (marioState) { o->oAngleVelYaw = (s32)(200.0f * marioState->forwardVel) + 1000; } @@ -42,11 +42,11 @@ void bhv_recovery_heart_loop(void) { if ((o->oSpinningHeartTotalSpin += o->oAngleVelYaw) >= 0x10000) { - struct MarioState* nearestState = nearest_mario_state_to_object(o); + struct MarioState* nearestInteractingState = nearest_interacting_mario_state_to_object(o); for (s32 i = 0; i < MAX_PLAYERS; i++) { if (!gMarioStates[i].visibleToEnemies) { continue; } if (!is_player_active(&gMarioStates[i])) { continue; } - if (&gMarioStates[i] == nearestState || dist_between_objects(o, gMarioStates[i].marioObj) < 1000) { + if (&gMarioStates[i] == nearestInteractingState || dist_between_objects(o, gMarioStates[i].marioObj) < 1000) { gMarioStates[i].healCounter += 4; } }