diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-03-30 15:45:42 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-03-30 15:45:42 -0400 |
commit | 8e82c291fddf460198ae2fb5bcc3e4e7d67898bc (patch) | |
tree | 62440df937f10dfdaae7433aaf1c418ec3db9890 /src/item_use.c | |
parent | 35b68c68ee565b9b232252e4f37ea082e9310560 (diff) |
Document bike.c and fix weird goto
Diffstat (limited to 'src/item_use.c')
-rw-r--r-- | src/item_use.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |