diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-03-30 16:14:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 16:14:01 -0400 |
commit | d1afbf17bbc9eb70cf085f3b734d02e4ce6b3b57 (patch) | |
tree | 555c5be369128cdac7ab258bba635968ad481cb5 /src/item_use.c | |
parent | 35b68c68ee565b9b232252e4f37ea082e9310560 (diff) | |
parent | d9234adb0065719535ba345648159691f85135ea (diff) |
Merge pull request #407 from PikalaxALT/doc_bike
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..b801e9ee5 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); + GetOnOffBike(PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE); ClearPlayerHeldMovementAndUnfreezeObjectEvents(); ScriptContext2_Disable(); DestroyTask(taskId); |