Display the correct hidden number count on late join

This commit is contained in:
MysterD 2022-03-29 19:49:36 -07:00
parent 7ad9875533
commit 61eed28a50
1 changed files with 4 additions and 1 deletions

View File

@ -61,7 +61,10 @@ void bhv_hidden_star_trigger_loop(void) {
if ((o->oInteractStatus & INT_STATUS_INTERACTED) || obj_check_if_collided_with_object(o, gMarioObjects[0]) == 1) { if ((o->oInteractStatus & INT_STATUS_INTERACTED) || obj_check_if_collided_with_object(o, gMarioObjects[0]) == 1) {
struct Object *hiddenStar = cur_obj_nearest_object_with_behavior(bhvHiddenStar); struct Object *hiddenStar = cur_obj_nearest_object_with_behavior(bhvHiddenStar);
if (hiddenStar != NULL) { if (hiddenStar != NULL) {
hiddenStar->oHiddenStarTriggerCounter++;
s16 count = (count_objects_with_behavior(bhvHiddenStarTrigger) - 1);
hiddenStar->oHiddenStarTriggerCounter = 5 - count;
if (hiddenStar->oHiddenStarTriggerCounter != 5) { if (hiddenStar->oHiddenStarTriggerCounter != 5) {
spawn_orange_number(hiddenStar->oHiddenStarTriggerCounter, 0, 0, 0); spawn_orange_number(hiddenStar->oHiddenStarTriggerCounter, 0, 0, 0);
} }