From ff1b19e2ee03b01db6eee32e8e27a9e0352fa7ba Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 8 Oct 2020 21:13:56 -0700 Subject: [PATCH] Prevent King Bobomb from grabbing while thrown --- src/game/behaviors/king_bobomb.inc.c | 11 +++++++++-- src/pc/controller/controller_keyboard_debug.c | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index d01ab824..dbaafbb3 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -362,7 +362,9 @@ void king_bobomb_move(void) { #endif } -u8 king_bobomb_ignore_if_true(void) { return o->oAction == 8; } +u8 king_bobomb_ignore_if_true(void) { + return o->oAction == 8; +} void bhv_king_bobomb_loop(void) { if (!network_sync_object_initialized(o)) { @@ -377,7 +379,12 @@ void bhv_king_bobomb_loop(void) { f32 sp34 = 20.0f; f32 sp30 = 50.0f; UNUSED u8 pad[8]; - o->oInteractionSubtype |= INT_SUBTYPE_GRABS_MARIO; + + if (o->oAction == 4) { + o->oInteractionSubtype &= ~INT_SUBTYPE_GRABS_MARIO; + } else { + o->oInteractionSubtype |= INT_SUBTYPE_GRABS_MARIO; + } switch (o->oHeldState) { case HELD_FREE: king_bobomb_move(); diff --git a/src/pc/controller/controller_keyboard_debug.c b/src/pc/controller/controller_keyboard_debug.c index d124bddb..cf738863 100644 --- a/src/pc/controller/controller_keyboard_debug.c +++ b/src/pc/controller/controller_keyboard_debug.c @@ -7,7 +7,7 @@ #ifdef DEBUG -static u8 warpToLevel = LEVEL_BITFS; +static u8 warpToLevel = LEVEL_BOB; #define SCANCODE_0 0x0B #define SCANCODE_1 0x02