diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2024-04-19 12:27:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-19 12:27:50 -0500 |
| commit | 565a62a5189dbe2b3e3a5b837a266a4f8423f575 (patch) | |
| tree | 51b8ccadcde88c25c804f85be7aa2d32ba8fb962 /soh/src/code | |
| parent | 67ee5f8d0e14fcaa4e614a80760be222670e0f16 (diff) | |
| parent | f4fc3662b6f55513fe846486c9ed75246a980103 (diff) | |
Merge pull request #4059 from Malkierian/dev-to-dev-rando-4-19
Dev to dev rando 4 19
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_actor.c | 9 | ||||
| -rw-r--r-- | soh/src/code/z_bgcheck.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_fcurve_data_skelanime.c | 4 | ||||
| -rw-r--r-- | soh/src/code/z_skelanime.c | 8 |
4 files changed, 21 insertions, 2 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index fed5ec639..c34ee9a9e 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -1240,7 +1240,7 @@ void Actor_Init(Actor* actor, PlayState* play) { actor->floorBgId = BGCHECK_SCENE; ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f); if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) { - //Actor_SetObjectDependency(play, actor); + Actor_SetObjectDependency(play, actor); actor->init(actor, play); actor->init = NULL; @@ -2589,6 +2589,13 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { Actor_SetObjectDependency(play, actor); actor->init(actor, play); actor->init = NULL; + + GameInteractor_ExecuteOnActorInit(actor); + + // For enemy health bar we need to know the max health during init + if (actor->category == ACTORCAT_ENEMY) { + actor->maximumHealth = actor->colChkInfo.health; + } } actor = actor->next; } else if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) { diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index 7c99e7ca2..064d59860 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -398,7 +398,7 @@ s32 CollisionPoly_LineVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* posA, V (poly->normal.x * posB->x + poly->normal.y * posB->y + poly->normal.z * posB->z) * COLPOLY_NORMAL_FRAC + plane.originDist; -#ifdef __WIIU__ +#if defined(__SWITCH__) || defined(__WIIU__) // on some platforms this ends up as very small numbers due to rounding issues if (IS_ZERO(planeDistA)) { planeDistA = 0.0f; diff --git a/soh/src/code/z_fcurve_data_skelanime.c b/soh/src/code/z_fcurve_data_skelanime.c index c75450be2..b75c34a61 100644 --- a/soh/src/code/z_fcurve_data_skelanime.c +++ b/soh/src/code/z_fcurve_data_skelanime.c @@ -131,6 +131,10 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelAnimeCurve* skelCurv Matrix_TranslateRotateZYX(&pos, &rot); Matrix_Scale(scale.x, scale.y, scale.z, MTXMODE_APPLY); + if (CVarGetInteger("gDisableLOD", 0)) { + lod = 0; + } + if (lod == 0) { s32 pad1; diff --git a/soh/src/code/z_skelanime.c b/soh/src/code/z_skelanime.c index 7440640a0..2123c2d3b 100644 --- a/soh/src/code/z_skelanime.c +++ b/soh/src/code/z_skelanime.c @@ -78,6 +78,10 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, Vec3f pos; Vec3s rot; + if (CVarGetInteger("gDisableLOD", 0)) { + lod = 0; + } + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); // "skel is NULL." @@ -191,6 +195,10 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable, Vec3s rot; Mtx* mtx = Graph_Alloc(play->state.gfxCtx, dListCount * sizeof(Mtx)); + if (CVarGetInteger("gDisableLOD", 0)) { + lod = 0; + } + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); // "skel is NULL." |
