refactor blue fire arrows (#7209)

check damage flags instead of actors, original way could run into issues with actor unloading
This commit is contained in:
Philip Dubé
2026-09-17 00:05:52 +00:00
committed by GitHub
parent ae62048910
commit e628cf0574
@@ -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;
}
});