From f7f774788716b6e400f42fc8ac3454fe86b7e2cd Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 13 Nov 2023 21:36:20 -0800 Subject: [PATCH] Fix allowing any layer in the mirror --- src/game/mario_misc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 58462e67..99a8ad3e 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -741,9 +741,10 @@ Gfx* geo_mirror_mario_backface_culling(s32 callContext, struct GraphNode* node, gSPSetGeometryMode(&gfx[1], G_CULL_BACK); gSPEndDisplayList(&gfx[2]); } + u32 layer = ((asGenerated->parameter & 0x02) == 2) ? LAYER_TRANSPARENT : LAYER_OPAQUE; - if ((asGenerated->parameter & 0xF0)) { - layer = asGenerated->parameter >> 0xF; + if ((asGenerated->parameter & 0xFC) != 0) { + layer = asGenerated->parameter >> 2; } asGenerated->fnNode.node.flags = (asGenerated->fnNode.node.flags & 0xFF) | (layer << 8); }