Fix: Update GetItem value for freestanding items and shopsanity plentiful (#2718)

* fix freestanding items not changing getItem value on the fly

* fix getItem models in shops for plentiful items
This commit is contained in:
Adam Bird
2023-04-18 00:41:08 -04:00
committed by GitHub
parent 579087e527
commit 19d8d38082
2 changed files with 34 additions and 1 deletions

View File

@@ -1426,6 +1426,15 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
*/
void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
if (gSaveContext.n64ddFlag && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
if (randoCheck != RC_UNKNOWN_CHECK) {
this->randoGiEntry =
Randomizer_GetItemFromKnownCheck(randoCheck, GI_NONE);
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
}
f32 mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
EnItem00_CustomItemsParticles(&this->actor, play, this->randoGiEntry);
@@ -1486,6 +1495,15 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
*/
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
if (gSaveContext.n64ddFlag) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
if (randoCheck != RC_UNKNOWN_CHECK) {
this->randoGiEntry =
Randomizer_GetItemFromKnownCheck(randoCheck, GI_NONE);
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
}
f32 mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
EnItem00_CustomItemsParticles(&this->actor, play, this->randoGiEntry);