summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorChristopher Leggett <chris@leggett.dev>2022-09-02 13:19:12 -0400
committerGitHub <noreply@github.com>2022-09-02 19:19:12 +0200
commit64aca784507fdcebd81e216ea3489739550d6a1a (patch)
tree4f03a5cbe16d9caa926798fa64c1f4bb954f2215 /soh/src/code
parent584a4ad818df3046c2e13d0ab1c2e6a7f6c67fa6 (diff)
Fixes Switch/Wii U crashes with Wonder Rupees and Bottleable Entities (#1360)
* Reorders switch statement to prevent some code that shouldn't execute. * Potentially fixes bottleable entities crash * Solves lack of ItemEntry for GI_MAX * Adds comment clarifying new GetItemEntry
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_en_item00.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index 54beafdab..899984b89 100644
--- a/soh/src/code/z_en_item00.c
+++ b/soh/src/code/z_en_item00.c
@@ -515,13 +515,13 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (!Actor_HasParent(&this->actor, globalCtx)) {
- if (!gSaveContext.n64ddFlag) {
- if (getItemId != GI_NONE) {
+ if (getItemId != GI_NONE) {
+ if (!gSaveContext.n64ddFlag) {
func_8002F554(&this->actor, globalCtx, getItemId);
+ } else {
+ getItem = Randomizer_GetRandomizedItem(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
+ GiveItemEntryFromActorWithFixedRange(&this->actor, globalCtx, getItem);
}
- } else {
- getItem = Randomizer_GetRandomizedItem(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
- GiveItemEntryFromActorWithFixedRange(&this->actor, globalCtx, getItem);
}
}