From a1d8d73c6d4c99010383383fe67236e02f75c523 Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 14 Oct 2020 20:58:03 -0700 Subject: [PATCH] Prevented vanish cap players from interacting with other players --- src/game/interaction.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/interaction.c b/src/game/interaction.c index cf881aca..7ee96fdb 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1280,6 +1280,15 @@ u32 interact_player(struct MarioState* m, UNUSED u32 interactType, struct Object if (m2 == NULL) { return FALSE; } if (m2->action == ACT_JUMBO_STAR_CUTSCENE) { return FALSE; } + // vanish cap players can't interact + u32 vanishFlags = (MARIO_VANISH_CAP | MARIO_CAP_ON_HEAD); + if ((m->flags & vanishFlags) == vanishFlags) { + return FALSE; + } + if ((m2->flags & vanishFlags) == vanishFlags) { + return FALSE; + } + // don't do further interactions if we've hopped on top if (resolve_player_collision(m, m2)) { return FALSE;