From ac099018e4252a165757f4a6cfafa9e8eacea9dd Mon Sep 17 00:00:00 2001 From: aMannus Date: Fri, 15 Jul 2022 14:56:52 +0200 Subject: [PATCH] still nothing yet --- soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 51a512855..14d0df072 100644 --- a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -613,9 +613,18 @@ void func_80B0D878(EnSw* this, GlobalContext* globalCtx) { x = (this->unk_364.x * 10.0f); y = (this->unk_364.y * 10.0f); z = (this->unk_364.z * 10.0f); - temp_v0 = - Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, this->actor.world.pos.x + x, - this->actor.world.pos.y + y, this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); + if (!(gSaveContext.n64ddFlag)) { + temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, + this->actor.world.pos.x + x, this->actor.world.pos.y + y, + this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); + } else { + s32 getItemId = GI_NONE; + getItemId = GetRandomizedItemId(getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum); + temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, getItemId, + this->actor.world.pos.x + x, this->actor.world.pos.y + y, + this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); + } + if (temp_v0 != NULL) { temp_v0->parent = NULL; }