From e628cf0574f962884aa17ba9f7c289a2b397ab91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Thu, 17 Sep 2026 00:05:52 +0000 Subject: [PATCH] refactor blue fire arrows (#7209) check damage flags instead of actors, original way could run into issues with actor unloading --- soh/soh/Enhancements/Items/BlueFireArrows.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/Items/BlueFireArrows.cpp b/soh/soh/Enhancements/Items/BlueFireArrows.cpp index 67ace8f119..5aebef1005 100644 --- a/soh/soh/Enhancements/Items/BlueFireArrows.cpp +++ b/soh/soh/Enhancements/Items/BlueFireArrows.cpp @@ -23,8 +23,8 @@ static void UpdateBlueFireCollidersBgIceShelter(void* actorPtr) { thisx->cylinder2.info.bumper.dmgFlags |= DMG_ARROW_ICE; } -static bool CheckAC(Actor* ac) { - return ac != NULL && ac->id == ACTOR_EN_ARROW && ac->child != NULL && ac->child->id == ACTOR_ARROW_ICE; +static bool HitByIceArrow(ColliderCylinder* cylinder) { + return cylinder->info.acHitInfo != NULL && (cylinder->info.acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE); } void RegisterBlueFireArrowsHooks() { @@ -47,7 +47,7 @@ void RegisterBlueFireArrowsHooks() { COND_VB_SHOULD(VB_BG_ICE_SHELTER_MELT, shouldRegister, { BgIceShelter* thisx = va_arg(args, BgIceShelter*); - if (CheckAC(thisx->cylinder1.base.ac) || CheckAC(thisx->cylinder2.base.ac)) { + if (HitByIceArrow(&thisx->cylinder1) || HitByIceArrow(&thisx->cylinder2)) { *should = true; } });