From a67a06c17cd67a93489e38e7f3d30a91c0b6ccb9 Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 18 Sep 2020 23:16:07 -0700 Subject: [PATCH] Unconnected players are now hidden/intangible --- src/game/mario.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/mario.c b/src/game/mario.c index 352bc6ef..d6071037 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1852,6 +1852,16 @@ s32 execute_mario_action(UNUSED struct Object *o) { if (Cheats.SuperSpeed && gMarioState->forwardVel > 0) gMarioState->forwardVel += 100; } + + // hide unconnected players + if (gNetworkPlayers[gMarioState->playerIndex].type != NPT_LOCAL) { + if (!gNetworkPlayers[gMarioState->playerIndex].connected) { + gMarioState->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; + gMarioState->marioObj->oIntangibleTimer = -1; + return 0; + } + } + /** * End of cheat stuff */