Document object lock and some trainer approach
This commit is contained in:
@@ -96,7 +96,7 @@ static void PlayerNotOnBikeCollideWithFarawayIslandMew(u8);
|
||||
|
||||
static void PlayCollisionSoundIfNotFacingWarp(u8 a);
|
||||
|
||||
static void sub_808C280(struct ObjectEvent *);
|
||||
static void HideShowWarpArrow(struct ObjectEvent *);
|
||||
|
||||
static void StartStrengthAnim(u8, u8);
|
||||
static void Task_PushBoulder(u8 taskId);
|
||||
@@ -323,7 +323,7 @@ void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||
|
||||
sub_808C280(playerObjEvent);
|
||||
HideShowWarpArrow(playerObjEvent);
|
||||
if (gPlayerAvatar.preventStep == FALSE)
|
||||
{
|
||||
Bike_TryAcroBikeHistoryUpdate(newKeys, heldKeys);
|
||||
@@ -940,9 +940,9 @@ u8 PlayerGetCopyableMovement(void)
|
||||
return gObjectEvents[gPlayerAvatar.objectEventId].playerCopyableMovement;
|
||||
}
|
||||
|
||||
static void sub_808B6BC(u8 a)
|
||||
static void PlayerForceSetHeldMovement(u8 movementActionId)
|
||||
{
|
||||
ObjectEventForceSetHeldMovement(&gObjectEvents[gPlayerAvatar.objectEventId], a);
|
||||
ObjectEventForceSetHeldMovement(&gObjectEvents[gPlayerAvatar.objectEventId], movementActionId);
|
||||
}
|
||||
|
||||
void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement)
|
||||
@@ -1020,12 +1020,13 @@ void PlayerJumpLedge(u8 direction)
|
||||
PlayerSetAnimId(GetJump2MovementAction(direction), 8);
|
||||
}
|
||||
|
||||
void sub_808B864(void)
|
||||
// Stop player on current facing direction once they're done moving and if they're not currently Acro Biking on bumpy slope
|
||||
void PlayerFreeze(void)
|
||||
{
|
||||
if (gPlayerAvatar.tileTransitionState == T_TILE_CENTER || gPlayerAvatar.tileTransitionState == T_NOT_MOVING)
|
||||
{
|
||||
if (player_should_look_direction_be_enforced_upon_movement())
|
||||
sub_808B6BC(GetFaceDirectionMovementAction(gObjectEvents[gPlayerAvatar.objectEventId].facingDirection));
|
||||
if (IsPlayerNotUsingAcroBikeOnBumpySlope())
|
||||
PlayerForceSetHeldMovement(GetFaceDirectionMovementAction(gObjectEvents[gPlayerAvatar.objectEventId].facingDirection));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1424,7 +1425,7 @@ void SetPlayerAvatarWatering(u8 direction)
|
||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFaceDirectionAnimNum(direction));
|
||||
}
|
||||
|
||||
static void sub_808C280(struct ObjectEvent *objectEvent)
|
||||
static void HideShowWarpArrow(struct ObjectEvent *objectEvent)
|
||||
{
|
||||
s16 x;
|
||||
s16 y;
|
||||
@@ -1435,6 +1436,7 @@ static void sub_808C280(struct ObjectEvent *objectEvent)
|
||||
{
|
||||
if (sArrowWarpMetatileBehaviorChecks2[x](metatileBehavior) && direction == objectEvent->movementDirection)
|
||||
{
|
||||
// Show warp arrow if applicable
|
||||
x = objectEvent->currentCoords.x;
|
||||
y = objectEvent->currentCoords.y;
|
||||
MoveCoords(direction, &x, &y);
|
||||
|
||||
Reference in New Issue
Block a user