From e9761cd3e6fe175ce41b178a8cdd11ab3d7f9988 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 4 Oct 2020 23:06:52 -0700 Subject: [PATCH] Prevent rare bug where a remote player will grab a non-grabbable object momentarily --- src/game/interaction.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/interaction.c b/src/game/interaction.c index bbe08bb4..dc534047 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -303,6 +303,8 @@ void mario_stop_riding_object(struct MarioState *m) { void mario_grab_used_object(struct MarioState *m) { if (m->usedObj == NULL || m->usedObj->oHeldState == HELD_HELD) { return; } if (m->heldObj == NULL && m->usedObj != NULL) { + // prevent grabbing a non-grabbable object + if (!(m->usedObj->oInteractType & INTERACT_GRABBABLE)) { return; } m->heldObj = m->usedObj; m->heldObj->heldByPlayerIndex = m->playerIndex; obj_set_held_state(m->heldObj, bhvCarrySomething3);