Fix star sparkles appearing for everyone (#172)

When collecting a star, originally the sparkles would appear on everyone even if they didn't collect the star, this has been fixed.
This commit is contained in:
Agent X 2022-08-25 20:42:45 -04:00 committed by GitHub
parent 916d59e9b5
commit 3b8a9801d3
1 changed files with 1 additions and 0 deletions

View File

@ -682,6 +682,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
struct MarioState* marioState = &gMarioStates[i];
if (!is_player_active(marioState)) { continue; }
if (marioState->marioObj == NULL) { continue; }
if (marioState->playerIndex != m->playerIndex) { continue; }
struct Object* celebStar = spawn_object(marioState->marioObj, MODEL_STAR, bhvCelebrationStar);
if (m != marioState && celebStar != NULL) {
celebStar->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;