From c5cf321348156ddb48a6737b27bff06e8aec3905 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 19 Nov 2023 17:24:14 -0800 Subject: [PATCH] Prevented rendering of disconnected mirror marios --- src/game/mario_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 80189b64..7e274112 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -673,6 +673,7 @@ Gfx* geo_render_mirror_mario(s32 callContext, struct GraphNode* node, UNUSED Mat for (s32 i = 0; i < MAX_PLAYERS; i++) { f32 mirroredX; struct MarioState* marioState = &gMarioStates[i]; + struct NetworkPlayer* np = &gNetworkPlayers[i]; struct Object* mario = marioState->marioObj; switch (callContext) { @@ -686,7 +687,7 @@ Gfx* geo_render_mirror_mario(s32 callContext, struct GraphNode* node, UNUSED Mat geo_remove_child_from_parent(node, &gMirrorMario[i].node); break; case GEO_CONTEXT_RENDER: - if (mario && (((struct GraphNode*)&mario->header.gfx)->flags & GRAPH_RENDER_ACTIVE)) { + if (mario && (((struct GraphNode*)&mario->header.gfx)->flags & GRAPH_RENDER_ACTIVE) && np->connected) { // TODO: Is this a geo layout copy or a graph node copy? gMirrorMario[i].sharedChild = mario->header.gfx.sharedChild; dynos_actor_override((void*)&gMirrorMario[i].sharedChild);