Fix #4506, Mido crash in intro cutscene with Open Forest (#4511)

This commit is contained in:
Garrett Cox 2024-11-02 12:50:48 -05:00 committed by GitHub
parent 0d17e72dca
commit 20ac33d380
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,8 @@ void MoveMidoInKokiriForest_Register() {
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) &&
!Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) &&
(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_DEKU) &&
(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_KOKIRI)
(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_KOKIRI) &&
gSaveContext.cutsceneIndex == 0
) {
Flags_SetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD);
*should = true;

View File

@ -76,6 +76,7 @@ typedef enum {
VB_MIDO_SPAWN,
// Opt: *EnMd
// Vanilla condition: EnMd->interactInfo.talkState == NPC_TALK_STATE_ACTION
// Note: When overriding this, ensure you're not in the intro cutscene as Mido's path has not been loaded
VB_MOVE_MIDO_IN_KOKIRI_FOREST,
// Opt: *EnMd
// Vanilla condition: CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)

View File

@ -674,7 +674,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
}
break;
case VB_MOVE_MIDO_IN_KOKIRI_FOREST:
if (RAND_GET_OPTION(RSK_FOREST) == RO_FOREST_OPEN) {
if (RAND_GET_OPTION(RSK_FOREST) == RO_FOREST_OPEN && gSaveContext.cutsceneIndex == 0) {
*should = true;
}
break;