follower movement and slow stairs

This commit is contained in:
Evan 2020-08-17 13:53:36 -06:00 committed by ghoulslash
parent a23f716209
commit 397da3736c
3 changed files with 13 additions and 2 deletions

View file

@ -119,5 +119,6 @@
#define DIR_NORTHEAST 8
#define SLOW_MOVEMENT_ON_STAIRS TRUE
#define FOLLOW_ME_IMPLEMENTED TRUE //for stairs movement. see ObjectMovingOnRockStairs in src/field_player_avatar.c
#endif // GUARD_CONSTANTS_GLOBAL_H

View file

@ -5175,8 +5175,13 @@ bool8 ObjectEventIsHeldMovementActive(struct ObjectEvent *objectEvent)
static u8 TryUpdateMovementActionOnStairs(struct ObjectEvent *objectEvent, u8 movementActionId)
{
if (objectEvent->isPlayer)
return movementActionId; //handled separately
#if FOLLOW_ME_IMPLEMENTED
if (objectEvent->isPlayer || objectEvent->localId == GetFollowerLocalId())
return movementActionId; //handled separately
#else
if (objectEvent->isPlayer)
return movementActionId; //handled separately
#endif
if (!ObjectMovingOnRockStairs(objectEvent, objectEvent->movementDirection))
return movementActionId;

View file

@ -2296,6 +2296,11 @@ bool8 ObjectMovingOnRockStairs(struct ObjectEvent *objectEvent, u8 direction)
s16 x = objectEvent->currentCoords.x;
s16 y = objectEvent->currentCoords.y;
#if FOLLOW_ME_IMPLEMENTED
if (PlayerHasFollower() && (objectEvent->isPlayer || objectEvent->localId == GetFollowerLocalId()))
return FALSE;
#endif
switch (direction)
{
case DIR_NORTH: