diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 4e66ac0bf3b..831a298f17c 100644 --- a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -157,6 +157,11 @@ void EnDntNomal_Init(Actor* thisx, PlayState* play) { } else { Actor_Kill(&this->actor); } + + // https://github.com/HarbourMasters/Shipwright/issues/2796 + // Default flowerPos to the actor's spawn position so the flower doesn't render at the origin if the draw function + // is enabled before SetFlower position (which waits for ground contact) has a chance to set the real position. + this->flowerPos = this->actor.world.pos; this->actionFunc = EnDntNomal_WaitForObject; } @@ -189,6 +194,7 @@ void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) { this->morphTable, 11); this->actor.draw = EnDntNomal_DrawStageScrub; } + this->actionFunc = EnDntNomal_SetFlower; } } @@ -887,4 +893,4 @@ void EnDntNomal_DrawTargetScrub(Actor* thisx, PlayState* play) { gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gHintNutsFlowerDL); CLOSE_DISPS(play->state.gfxCtx); -} +} \ No newline at end of file