Fix NPC dialog setting to idle and restore Yoshi somewhat

This commit is contained in:
Agent X 2023-12-17 23:26:54 -05:00
parent bdb8f11eab
commit 6419e53297
2 changed files with 12 additions and 18 deletions

View file

@ -225,20 +225,14 @@ void bhv_yoshi_loop(void) {
}
if (sYoshiTalkingState > 2) {
if (gHudDisplay.lives >= 100) {
if (gHudDisplay.lives >= 100 && !gMarioStates[0].specialTripleJump) {
gMarioStates[0].specialTripleJump = true;
sYoshiTalkingState = 3;
set_mario_action(&gMarioStates[0], ACT_IDLE, 0);
} else if ((gGlobalTimer & 0x03) == 0) {
play_sound(SOUND_MENU_YOSHI_GAIN_LIVES, gGlobalSoundSource);
gMarioStates[0].numLives++;
}
}
if (gMarioStates[0].action == ACT_WAITING_FOR_DIALOG) {
if (gMarioStates[0].interactObj == o) {
set_mario_action(&gMarioStates[0], ACT_IDLE, 0);
o->oInteractStatus = 0;
}
}
curr_obj_random_blink(&o->oYoshiBlinkTimer);
}

View file

@ -394,16 +394,16 @@ s32 set_mario_npc_dialog(struct MarioState* m, s32 actionArg, u8 (*inContinueDia
s32 dialogState = 0;
if (m->playerIndex == 0) {
if (actionArg == 0 || inContinueDialogFunction == NULL) {
localDialogNPCBehavior = NULL;
gContinueDialogFunction = NULL;
gContinueDialogFunctionObject = NULL;
} else {
gContinueDialogFunction = inContinueDialogFunction;
gContinueDialogFunctionObject = gCurrentObject;
}
}
// if (m->playerIndex == 0) {
// if (actionArg == 0 || inContinueDialogFunction == NULL) {
// localDialogNPCBehavior = NULL;
// gContinueDialogFunction = NULL;
// gContinueDialogFunctionObject = NULL;
// } else {
// gContinueDialogFunction = inContinueDialogFunction;
// gContinueDialogFunctionObject = gCurrentObject;
// }
// }
// in dialog
if (m->action == ACT_READING_NPC_DIALOG) {