fix shopsanity spawning objects for actors (#2247)

This commit is contained in:
Adam Bird 2022-12-23 22:26:01 -05:00 committed by GitHub
parent 07bae6b84c
commit d215c76eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -422,10 +422,10 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
objectId = getItemEntry.objectId;
}
// Weird edge case here, sold out object reports as loaded for Kokiri shop but doesn't render so we force it to load here
if (Object_IsLoaded(&play->objectCtx, objectId) && (params != SI_SOLD_OUT && play->sceneNum == SCENE_KOKIRI_SHOP)) {
this->objBankIndex = Object_GetIndex(&play->objectCtx, objectId);
} else {
// If the object isn't normally spawned by the shop scene, then spawn it now
if (this->objBankIndex < 0) {
this->objBankIndex = Object_Spawn(&play->objectCtx, objectId);
}
}