summaryrefslogtreecommitdiff
path: root/soh/src
diff options
context:
space:
mode:
authorTaw <Tawling@users.noreply.github.com>2024-02-10 09:06:34 -0800
committerTaw <Tawling@users.noreply.github.com>2024-02-12 08:26:36 -0800
commit4e5b92fdf385e34da94049071233dbe9c872cbca (patch)
treee53e2293f0910b4f5dc39986cc8d9f502edaed04 /soh/src
parent596ea5ebbb3e5a5dfab72fb7bee6d4802d8b13d4 (diff)
Man On Roof
Diffstat (limited to 'soh/src')
-rw-r--r--soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c
index 15ebd759c..5093d47d2 100644
--- a/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c
+++ b/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c
@@ -6,6 +6,7 @@
#include "z_en_ani.h"
#include "objects/object_ani/object_ani.h"
+#include "soh/Enhancements/game-interactor/GameInteractor.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
@@ -119,7 +120,7 @@ void func_809B0524(EnAni* this, PlayState* play) {
}
void func_809B0558(EnAni* this, PlayState* play) {
- if (Actor_HasParent(&this->actor, play)) {
+ if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
this->actor.parent = NULL;
if (!LINK_IS_ADULT) {
EnAni_SetupAction(this, func_809B04F0);
@@ -128,11 +129,8 @@ void func_809B0558(EnAni* this, PlayState* play) {
}
Flags_SetItemGetInf(ITEMGETINF_15);
} else {
- if (!IS_RANDO) {
+ if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
- } else {
- GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
- GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 200.0f);
}
}
}
@@ -142,11 +140,8 @@ void func_809B05F0(EnAni* this, PlayState* play) {
EnAni_SetupAction(this, func_809B0558);
}
- if (!IS_RANDO) {
+ if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
- } else {
- GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
- GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 200.0f);
}
}