diff --git a/src/game/behaviors/mushroom_1up.inc.c b/src/game/behaviors/mushroom_1up.inc.c index 1b6b25cb..929f4a58 100644 --- a/src/game/behaviors/mushroom_1up.inc.c +++ b/src/game/behaviors/mushroom_1up.inc.c @@ -1,13 +1,19 @@ // mushroom_1up.c.inc void bhv_1up_interact(void) { + if (o->activeFlags == ACTIVE_FLAG_DEACTIVATED) { return; } UNUSED s32 sp1C; struct MarioState* marioState = nearest_mario_state_to_object(o); - if (marioState->playerIndex == 0 && obj_check_if_collided_with_object(o, marioState->marioObj) == 1) { + u8 hitLocalPlayer = (marioState->playerIndex == 0) && (obj_check_if_collided_with_object(o, marioState->marioObj) == 1); + + if (hitLocalPlayer || (o->oInteractStatus & INT_STATUS_INTERACTED)) { play_sound(SOUND_GENERAL_COLLECT_1UP, gDefaultSoundArgs); - marioState->numLives++; + gMarioState[0].numLives++; o->activeFlags = ACTIVE_FLAG_DEACTIVATED; + if (hitLocalPlayer) { + network_send_collect_item(o); + } } } diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c index dba26859..ab21f122 100644 --- a/src/game/mario_actions_automatic.c +++ b/src/game/mario_actions_automatic.c @@ -919,8 +919,12 @@ s32 act_bubbled(struct MarioState* m) { m->marioObj->header.gfx.angle[1] = angleToPlayer; // make invisible on -1 lives - if (m->numLives == -1) { - m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; + if (m->playerIndex == 0) { + if (m->numLives == -1) { + m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; + } else { + m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; + } } // pop bubble