From 9427afb14bd0404cf513ae9f4114a8d330222857 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 5 Sep 2020 13:31:27 -0700 Subject: [PATCH] Allow vanish cap to pass through walls fixes #16 --- src/engine/surface_collision.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/surface_collision.c b/src/engine/surface_collision.c index b298f752d..209d8f668 100644 --- a/src/engine/surface_collision.c +++ b/src/engine/surface_collision.c @@ -130,12 +130,15 @@ static s32 find_wall_collisions_from_list(struct SurfaceNode *surfaceNode, } // If Mario has a vanish cap, pass through the vanish cap wall. + u8 passThroughWall = FALSE; for (int i = 0; i < MAX_PLAYERS; i++) { if (gCurrentObject != NULL && gCurrentObject == gMarioStates[i].marioObj && (gMarioStates[i].flags & MARIO_VANISH_CAP)) { + passThroughWall = TRUE; continue; } } + if (passThroughWall) { continue; } } }