fix sand onto sideways stairs bug

This commit is contained in:
Evan 2020-08-22 15:25:41 -06:00 committed by ghoulslash
parent 397da3736c
commit 01d08d3cee
2 changed files with 9 additions and 4 deletions

View File

@ -119,6 +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
#define FOLLOW_ME_IMPLEMENTED FALSE //for stairs movement. see ObjectMovingOnRockStairs in src/field_player_avatar.c
#endif // GUARD_CONSTANTS_GLOBAL_H

View File

@ -7900,12 +7900,17 @@ static void GetGroundEffectFlags_LongGrassOnBeginStep(struct ObjectEvent *objEve
static void GetGroundEffectFlags_Tracks(struct ObjectEvent *objEvent, u32 *flags)
{
if (MetatileBehavior_IsDeepSand(objEvent->previousMetatileBehavior))
u8 behavior = objEvent->previousMetatileBehavior;
if (objEvent->directionOverwrite)
return;
if (MetatileBehavior_IsDeepSand(behavior))
{
*flags |= GROUND_EFFECT_FLAG_DEEP_SAND;
}
else if (MetatileBehavior_IsSandOrDeepSand(objEvent->previousMetatileBehavior)
|| MetatileBehavior_IsFootprints(objEvent->previousMetatileBehavior))
else if (MetatileBehavior_IsSandOrDeepSand(behavior)
|| MetatileBehavior_IsFootprints(behavior))
{
*flags |= GROUND_EFFECT_FLAG_SAND;
}