From 3a8ba03ce818b94b744496cc483132178340ba04 Mon Sep 17 00:00:00 2001 From: aMannus Date: Sat, 14 Dec 2024 22:31:29 +0100 Subject: [PATCH] CrowdControl random buttons fix (#4679) * CC random buttons fix * Archez's fix --- soh/soh/Enhancements/game-interactor/GameInteractionEffect.h | 2 +- soh/soh/Enhancements/randomizer/ShufflePots.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h index ebc1b6fac..5e28024b6 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h @@ -217,7 +217,7 @@ namespace GameInteractionEffect { void _Apply() override; }; - class PressRandomButton: public GameInteractionEffectBase, public ParameterizedGameInteractionEffect { + class PressRandomButton: public RemovableGameInteractionEffect, public ParameterizedGameInteractionEffect { GameInteractionEffectQueryResult CanBeApplied() override; void _Apply() override; }; diff --git a/soh/soh/Enhancements/randomizer/ShufflePots.cpp b/soh/soh/Enhancements/randomizer/ShufflePots.cpp index 57fcc7b79..da5b7cdc9 100644 --- a/soh/soh/Enhancements/randomizer/ShufflePots.cpp +++ b/soh/soh/Enhancements/randomizer/ShufflePots.cpp @@ -54,7 +54,8 @@ void ObjTsubo_RandomizerSpawnCollectible(ObjTsubo* potActor, PlayState* play) { void ObjTsubo_RandomizerInit(void* actorRef) { Actor* actor = static_cast(actorRef); - if (actor->id != ACTOR_OBJ_TSUBO) return; + // Check for Lake Hylia specifically because the game spawns 2 pots out of bounds there for some reason. + if (actor->id != ACTOR_OBJ_TSUBO || gPlayState->sceneNum == SCENE_LAKE_HYLIA) return; ObjTsubo* potActor = static_cast(actorRef);