Make recovery heart only heal the player who interacted with it

This commit is contained in:
Agent X 2024-03-09 11:44:44 -05:00
parent edd29c0719
commit 0bb62eb381

View file

@ -46,7 +46,7 @@ void bhv_recovery_heart_loop(void) {
for (s32 i = 0; i < MAX_PLAYERS; i++) {
if (!gMarioStates[i].visibleToEnemies) { continue; }
if (!is_player_active(&gMarioStates[i])) { continue; }
if (&gMarioStates[i] == nearestInteractingState || dist_between_objects(o, gMarioStates[i].marioObj) < 1000) {
if (&gMarioStates[i] == nearestInteractingState || (dist_between_objects(o, gMarioStates[i].marioObj) < 1000 && configCoopCompatibility)) {
gMarioStates[i].healCounter += 4;
}
}