Made in-level save dialog only show up for the player that collected the star

This commit is contained in:
MysterD 2020-09-23 20:35:56 -07:00
parent 4217306a44
commit 7fbae9cc05

View file

@ -657,7 +657,9 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
celebStar->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; celebStar->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;
} }
} }
if (m->playerIndex == 0) {
disable_background_sound(); disable_background_sound();
}
if (m->actionArg & 1) { if (m->actionArg & 1) {
play_course_clear(); play_course_clear();
} else { } else {
@ -676,13 +678,17 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
case 80: case 80:
if ((m->actionArg & 1) == 0) { if ((m->actionArg & 1) == 0) {
level_trigger_warp(m, WARP_OP_STAR_EXIT); level_trigger_warp(m, WARP_OP_STAR_EXIT);
} else { } else if (m->playerIndex == 0) {
//enable_time_stop(); //enable_time_stop();
create_dialog_box_with_response(gLastCompletedStarNum == 7 ? DIALOG_013 : DIALOG_014); create_dialog_box_with_response(gLastCompletedStarNum == 7 ? DIALOG_013 : DIALOG_014);
m->actionState = 1; m->actionState = 1;
} else {
set_mario_action(m, isInWater ? ACT_WATER_IDLE : ACT_IDLE, 0);
} }
break; break;
} }
} else if (m->playerIndex != 0) {
set_mario_action(m, isInWater ? ACT_WATER_IDLE : ACT_IDLE, 0);
} else if (m->actionState == 1 && gDialogResponse) { } else if (m->actionState == 1 && gDialogResponse) {
if (gDialogResponse == 1) { if (gDialogResponse == 1) {
save_file_do_save(gCurrSaveFileNum - 1); save_file_do_save(gCurrSaveFileNum - 1);