mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-05-10 19:01:46 +00:00
Prevented rendering of disconnected mirror marios
This commit is contained in:
parent
23193887db
commit
520cff93d9
1 changed files with 2 additions and 1 deletions
|
|
@ -674,6 +674,7 @@ Gfx* geo_render_mirror_mario(s32 callContext, struct GraphNode* node, UNUSED Mat
|
||||||
for (s32 i = 0; i < MAX_PLAYERS; i++) {
|
for (s32 i = 0; i < MAX_PLAYERS; i++) {
|
||||||
f32 mirroredX;
|
f32 mirroredX;
|
||||||
struct MarioState* marioState = &gMarioStates[i];
|
struct MarioState* marioState = &gMarioStates[i];
|
||||||
|
struct NetworkPlayer* np = &gNetworkPlayers[i];
|
||||||
struct Object* mario = marioState->marioObj;
|
struct Object* mario = marioState->marioObj;
|
||||||
|
|
||||||
switch (callContext) {
|
switch (callContext) {
|
||||||
|
|
@ -687,7 +688,7 @@ Gfx* geo_render_mirror_mario(s32 callContext, struct GraphNode* node, UNUSED Mat
|
||||||
geo_remove_child_from_parent(node, &gMirrorMario[i].node);
|
geo_remove_child_from_parent(node, &gMirrorMario[i].node);
|
||||||
break;
|
break;
|
||||||
case GEO_CONTEXT_RENDER:
|
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?
|
// TODO: Is this a geo layout copy or a graph node copy?
|
||||||
gMirrorMario[i].sharedChild = mario->header.gfx.sharedChild;
|
gMirrorMario[i].sharedChild = mario->header.gfx.sharedChild;
|
||||||
dynos_actor_override((void*)&gMirrorMario[i].sharedChild);
|
dynos_actor_override((void*)&gMirrorMario[i].sharedChild);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue