Merge pull request #85 from Tawling/vbo-man-on-roof

GI VB for Man On Roof
This commit is contained in:
Garrett Cox 2024-02-21 02:12:53 +00:00 committed by GitHub
commit d28257088b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 9 deletions

View File

@ -271,6 +271,7 @@ typedef enum {
GI_VB_GIVE_ITEM_FROM_MAGIC_BEAN_SALESMAN,
// Opt: *EnFr
GI_VB_GIVE_ITEM_FROM_FROGS,
GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF,
// Opt: *EnSyatekiMan
GI_VB_GIVE_ITEM_FROM_SHOOTING_GALLERY,

View File

@ -803,6 +803,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
case GI_VB_ANJU_SET_OBTAINED_TRADE_ITEM:
case GI_VB_GIVE_ITEM_FROM_ROLLING_GORON_AS_CHILD:
case GI_VB_GIVE_ITEM_FROM_LAB_DIVE:
case GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF:
case GI_VB_GIVE_ITEM_SKULL_TOKEN:
case GI_VB_GIVE_ITEM_FROM_BLUE_WARP:
case GI_VB_GIVE_ITEM_FAIRY_OCARINA:

View File

@ -6,6 +6,7 @@
#include "z_en_ani.h"
#include "objects/object_ani/object_ani.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.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);
}
}