From 8e82c291fddf460198ae2fb5bcc3e4e7d67898bc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 30 Mar 2021 15:45:42 -0400 Subject: Document bike.c and fix weird goto --- src/item_use.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/item_use.c') diff --git a/src/item_use.c b/src/item_use.c index 585d44273..008f66e7d 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -263,7 +263,7 @@ void FieldUseFunc_MachBike(u8 taskId) || MetatileBehavior_IsIsolatedVerticalRail(behavior) == TRUE || MetatileBehavior_IsIsolatedHorizontalRail(behavior) == TRUE) DisplayItemMessageInCurrentContext(taskId, gTasks[taskId].data[3], 2, gUnknown_8416451); - else if (Overworld_IsBikingAllowed() == TRUE && !MetatileAtPlayerPositionForbidsBiking()) + else if (Overworld_IsBikingAllowed() == TRUE && !IsBikingDisallowedByPlayer()) { sItemUseOnFieldCB = ItemUseOnFieldCB_Bicycle; sub_80A103C(taskId); @@ -276,7 +276,7 @@ static void ItemUseOnFieldCB_Bicycle(u8 taskId) { if (!TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE)) PlaySE(SE_BIKE_BELL); - StartTransitionToFlipBikeState(PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE); + GoOnOffBike(PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE); ClearPlayerHeldMovementAndUnfreezeObjectEvents(); ScriptContext2_Disable(); DestroyTask(taskId); -- cgit v1.2.3