Fix missing despawn branch for heart containers (#4350)

This commit is contained in:
Garrett Cox
2024-09-20 17:37:34 -05:00
committed by GitHub
parent 74c93b0182
commit 5d8841777a
3 changed files with 16 additions and 11 deletions
@@ -6,6 +6,7 @@
#include "z_item_b_heart.h"
#include "objects/object_gi_hearts/object_gi_hearts.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS 0
@@ -39,7 +40,7 @@ static InitChainEntry sInitChain[] = {
void ItemBHeart_Init(Actor* thisx, PlayState* play) {
ItemBHeart* this = (ItemBHeart*)thisx;
if (Flags_GetCollectible(play, 0x1F)) {
if (GameInteractor_Should(VB_ITEM_B_HEART_DESPAWN, Flags_GetCollectible(play, 0x1F), this)) {
Actor_Kill(&this->actor);
} else {
Actor_ProcessInitChain(&this->actor, sInitChain);