diff options
| author | Christopher Leggett <chris@leggett.dev> | 2026-03-26 14:18:01 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-26 14:18:01 +0000 |
| commit | 4aa6e2ec280de14cecd79cdb3de607d7bc9cf1f3 (patch) | |
| tree | 88ec243d5ae531e675dfb12682ac500d8cbe4f56 | |
| parent | 94b650ec67dfa9a3b13f937ae0ba25a427147d21 (diff) | |
Move retrieval of dbEntry after Actor_Destroy (#6410)
Before I had the change back to the placeholder actor id the Dummy
Player actors were spawned with, but since we grabbed the actorDB
entry before Actor_Destroy was called it didn't matter. Move it
and the requisite log statement to after Actor_Destroy.
| -rw-r--r-- | soh/src/code/z_actor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index f0ca7c0cd..54c33e2cf 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -3491,12 +3491,6 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) { // Execute before actor memory is freed GameInteractor_ExecuteOnActorDestroy(actor); - dbEntry = ActorDB_Retrieve(actor->id); - - if (HREG(20) != 0) { - osSyncPrintf("アクタークラス削除 [%s]\n", dbEntry->name); // "Actor class deleted [%s]" - } - if ((player != NULL) && (actor == player->focusActor)) { Player_ReleaseLockOn(player); Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), 0); @@ -3517,6 +3511,12 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) { Audio_StopSfxByPos(&actor->projectedPos); Actor_Destroy(actor, play); + dbEntry = ActorDB_Retrieve(actor->id); + + if (HREG(20) != 0) { + osSyncPrintf("アクタークラス削除 [%s]\n", dbEntry->name); // "Actor class deleted [%s]" + } + newHead = Actor_RemoveFromCategory(play, actorCtx, actor); // #region SOH [ObjectExtension] |
