Fixes crashes with Audio_PlayFanfare_Rando.

This commit is contained in:
Christopher Leggett 2022-08-14 13:19:41 -04:00
parent 203785f76a
commit 3bf92a348c
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79
2 changed files with 4 additions and 1 deletions

View File

@ -3919,6 +3919,9 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
Audio_PlayFanfare(temp1);
}
} else if (getItem.modIndex == MOD_RANDOMIZER) {
if ((getItemId >= RG_BOTTLE_WITH_RED_POTION && getItemId <= RG_BOTTLE_WITH_BIG_POE) || (getItemId >= RG_DEKU_TREE_MAP && getItemId <= RG_GANONS_CASTLE_SMALL_KEY)) {
temp1 = NA_BGM_ITEM_GET | 0x900;
}
// If the setting is toggled on and we get special quest items (longer fanfares):
if (CVar_GetS32("gRandoQuestItemFanfares", 0) != 0) {
// If we get a medallion, play the "get a medallion" fanfare

View File

@ -123,7 +123,7 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) {
}
Message_StartTextbox(globalCtx, textId, NULL);
if (gSaveContext.n64ddFlag) {
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
Audio_PlayFanfare_Rando(getItem);
} else {
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);