From 753d2ed21e39278627a4f29fec15e6a3ed56ff03 Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 14 Oct 2020 20:42:04 -0700 Subject: [PATCH] Prevent players from interacting with a shell that someone else is riding --- src/game/interaction.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/interaction.c b/src/game/interaction.c index 3b3a051d..bce92a11 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1708,6 +1708,11 @@ u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct O return FALSE; } + for (int i = 0; i < MAX_PLAYERS; i++) { + if (!is_player_active(&gMarioStates[i])) { continue; } + if (gMarioStates[i].riddenObj == o) { return FALSE; } + } + if (!(m->action & ACT_FLAG_RIDING_SHELL)) { u32 interaction = determine_interaction(m, o);