diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index f954d6b60..8e0fae2e1 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -1194,6 +1194,10 @@ void RegisterSilverRupeeShuffle() { if (actor->id == ACTOR_EN_G_SWITCH) { auto* silverRupee = reinterpret_cast(actor); if (silverRupee->type == ENGSWITCH_SILVER_RUPEE) { + // Override any Actor_Kill calls from the vanilla silver rupee init function. + silverRupee->actor.update = EnGSwitch_Update; + silverRupee->actor.flags = ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED; + Actor_SetScale(&silverRupee->actor, 0.03f); Rando::Position randoPos = {static_cast(gPlayState->sceneNum), ResourceMgr_IsSceneMasterQuest(gPlayState->sceneNum) ? RCQUEST_MQ : RCQUEST_VANILLA, actor->world.pos}; silverRupee->rc = Rando::StaticData::silverRupeeMap.at(randoPos); Rando::Location* loc = Rando::StaticData::GetLocation(silverRupee->rc); diff --git a/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h b/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h index 53a325116..a160c7f74 100644 --- a/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h +++ b/soh/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h @@ -8,6 +8,14 @@ struct EnGSwitch; typedef void (*EnGSwitchActionFunc)(struct EnGSwitch*, PlayState*); +#ifdef __cplusplus +extern "C" { +#endif +void EnGSwitch_Update(Actor* thisx, PlayState* play); +#ifdef __cplusplus +} +#endif + typedef enum { /* 0 */ GSWITCH_NONE, /* 1 */ GSWITCH_APPEAR,