diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index 9f0e14738..f4019b45f 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -16,6 +16,7 @@ struct MarioState* king_bobomb_nearest_mario_state() { nearestDist = dist; } } + if (!checkActive) { break; } checkActive = FALSE; } while (nearest == NULL); diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index 0a3225a58..59ade4af1 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -535,6 +535,7 @@ struct MarioState* nearest_mario_state_to_object(struct Object *obj) { nearestDist = dist; } } + if (!checkActive) { break; } checkActive = FALSE; } while (nearest == NULL);