summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_actor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index 59966491c..605662669 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -3571,9 +3571,12 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32
// This block below is for determining the closest actor to player in determining the volume
// used while playing enemy bgm music
- if ((actorCategory == ACTORCAT_ENEMY) &&
- CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
- (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) {
+ if (GameInteractor_Should(
+ VB_DETECT_BGM_ENEMY,
+ (actorCategory == ACTORCAT_ENEMY) &&
+ CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
+ (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq),
+ actor, &sbgmEnemyDistSq, (int32_t)actorCategory)) {
actorCtx->targetCtx.bgmEnemy = actor;
sbgmEnemyDistSq = actor->xyzDistToPlayerSq;
}