follower movement and slow stairs
This commit is contained in:
parent
a23f716209
commit
397da3736c
3 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue