summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authornclok1405 <155463060+nclok1405@users.noreply.github.com>2026-01-06 00:07:05 +0900
committerGitHub <noreply@github.com>2026-01-05 15:07:05 +0000
commit7c4a3359f005ab97483ed01fd83fe6a79a27d43a (patch)
tree296215d0ca4a00c3443c4b50fad32bbd467af4d8 /soh/src/code
parent392bb6c59f64a50560136dac26e35da19afd5438 (diff)
Enable Battle Music for Leever option + Modularize EnemyBGMDisable (#5985)
Add "Enable Enemy Proximity Music for Leever" option + Modularize EnemyBGMDisable
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;
}