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.
This commit is contained in:
committed by
GitHub
parent
94b650ec67
commit
4aa6e2ec28
@@ -3491,12 +3491,6 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
|
|||||||
// Execute before actor memory is freed
|
// Execute before actor memory is freed
|
||||||
GameInteractor_ExecuteOnActorDestroy(actor);
|
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)) {
|
if ((player != NULL) && (actor == player->focusActor)) {
|
||||||
Player_ReleaseLockOn(player);
|
Player_ReleaseLockOn(player);
|
||||||
Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), 0);
|
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);
|
Audio_StopSfxByPos(&actor->projectedPos);
|
||||||
Actor_Destroy(actor, play);
|
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);
|
newHead = Actor_RemoveFromCategory(play, actorCtx, actor);
|
||||||
|
|
||||||
// #region SOH [ObjectExtension]
|
// #region SOH [ObjectExtension]
|
||||||
|
|||||||
Reference in New Issue
Block a user