Fix fanfare spam in sm74
This commit is contained in:
parent
1bfd8b09f8
commit
7905624cb5
|
@ -2975,6 +2975,7 @@ void print_hud_course_complete_coins(s16 x, s16 y) {
|
||||||
|
|
||||||
void play_star_fanfare_and_flash_hud(s32 arg, u8 starNum) {
|
void play_star_fanfare_and_flash_hud(s32 arg, u8 starNum) {
|
||||||
if (gHudDisplay.coins == gCourseCompleteCoins && (gCurrCourseStarFlags & starNum) == 0 && gHudFlash == 0) {
|
if (gHudDisplay.coins == gCourseCompleteCoins && (gCurrCourseStarFlags & starNum) == 0 && gHudFlash == 0) {
|
||||||
|
gCurrCourseStarFlags |= starNum; // SM74 was spamming fanfare without this line
|
||||||
play_star_fanfare();
|
play_star_fanfare();
|
||||||
gHudFlash = arg;
|
gHudFlash = arg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,6 +242,7 @@ s32 get_star_collection_dialog(struct MarioState *m) {
|
||||||
s32 dialogID = 0;
|
s32 dialogID = 0;
|
||||||
|
|
||||||
if (smlua_call_event_hooks_ret_int(HOOK_GET_STAR_COLLECTION_DIALOG, &dialogID)) {
|
if (smlua_call_event_hooks_ret_int(HOOK_GET_STAR_COLLECTION_DIALOG, &dialogID)) {
|
||||||
|
m->prevNumStarsForDialog = m->numStars;
|
||||||
return dialogID;
|
return dialogID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue