fix rock climb retaining bike flags

This commit is contained in:
Evan 2020-12-03 14:35:04 -05:00
parent 4aec28c55a
commit 15f7a6ecbb

View File

@ -3972,6 +3972,7 @@ static bool8 RockClimb_Init(struct Task *task, struct ObjectEvent *objectEvent)
ScriptContext2_Enable();
FreezeObjectEvents();
gPlayerAvatar.preventStep = TRUE;
SetPlayerAvatarStateMask(PLAYER_AVATAR_FLAG_SURFING);
PlayerGetDestCoords(&task->tDestX, &task->tDestY);
MoveCoords(gObjectEvents[gPlayerAvatar.objectEventId].movementDirection, &task->tDestX, &task->tDestY);
task->tState++;
@ -4107,6 +4108,7 @@ static bool8 RockClimb_ContinueRideOrEnd(struct Task *task, struct ObjectEvent *
ScriptContext2_Enable();
gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_SURFING;
gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_5;
gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_ON_FOOT;
task->tState++;
return FALSE;