From 6ed3c2cc60b913f62142f4b09d3c5e4e96c8d9a8 Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 24 Apr 2023 17:00:29 -0700 Subject: [PATCH] Prevent rumbling when other players are swimming --- src/game/behaviors/mushroom_1up.inc.c | 4 +++- src/game/mario_actions_cutscene.c | 8 ++++++-- src/game/mario_actions_submerged.c | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/game/behaviors/mushroom_1up.inc.c b/src/game/behaviors/mushroom_1up.inc.c index 7f72a2dc..3e4c1d2c 100644 --- a/src/game/behaviors/mushroom_1up.inc.c +++ b/src/game/behaviors/mushroom_1up.inc.c @@ -11,7 +11,9 @@ void bhv_1up_interact(void) { marioState->hurtCounter = 0; } #ifdef VERSION_SH - queue_rumble_data(5, 80); + if (marioState->playerIndex == 0) { + queue_rumble_data(5, 80); + } #endif network_send_collect_item(o); } diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index f94a743f..b2897eab 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -1593,7 +1593,9 @@ s32 act_teleport_fade_out(struct MarioState *m) { if (m->actionTimer == 0) { queue_rumble_data_mario(m, 30, 70); - func_sh_8024C89C(2); + if (m->playerIndex == 0) { + func_sh_8024C89C(2); + } } m->flags |= MARIO_TELEPORTING; @@ -1620,7 +1622,9 @@ s32 act_teleport_fade_in(struct MarioState *m) { if (m->actionTimer == 0) { queue_rumble_data_mario(m, 30, 70); - func_sh_8024C89C(2); + if (m->playerIndex == 0) { + func_sh_8024C89C(2); + } } if (m->actionTimer < 32) { diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index f87ff851..80f9cdd0 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -577,7 +577,7 @@ static s32 act_breaststroke(struct MarioState *m) { reset_float_globals(m); } - if (m->actionTimer < 6) { + if (m->actionTimer < 6 && m->playerIndex == 0) { func_sh_8024CA04(); }