mirror of
https://github.com/pret/pokefirered.git
synced 2026-05-15 08:41:01 -05:00
Merge pull request #339 from ghoulslash/fixes
fix PLAYER_AVATAR_FLAG_WATERING
This commit is contained in:
commit
1648d6c66b
|
|
@ -304,7 +304,7 @@ enum {
|
|||
#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << PLAYER_AVATAR_STATE_UNDERWATER)
|
||||
#define PLAYER_AVATAR_FLAG_FIELD_MOVE (1 << PLAYER_AVATAR_STATE_FIELD_MOVE)
|
||||
#define PLAYER_AVATAR_FLAG_FISHING (1 << PLAYER_AVATAR_STATE_FISHING)
|
||||
#define PLAYER_AVATAR_FLAG_WATERING (1 << PLAYER_AVATAR_STATE_WATERING)
|
||||
#define PLAYER_AVATAR_FLAG_DASH (1 << PLAYER_AVATAR_STATE_WATERING)
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ s16 GetPlayerSpeed(void)
|
|||
return exp[gPlayerAvatar.bikeFrameCounter];
|
||||
else if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE)
|
||||
return 3;
|
||||
else if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_WATERING))
|
||||
else if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_DASH))
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -3037,7 +3037,7 @@ bool8 ObjectEventIsTrainerAndCloseToPlayer(struct ObjectEvent *objectEvent)
|
|||
s16 minY;
|
||||
s16 maxY;
|
||||
|
||||
if (!TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_WATERING))
|
||||
if (!TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_DASH))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ static void npc_clear_strange_bits(struct ObjectEvent *objEvent)
|
|||
objEvent->inanimate = FALSE;
|
||||
objEvent->disableAnim = FALSE;
|
||||
objEvent->facingDirectionLocked = FALSE;
|
||||
gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_WATERING;
|
||||
gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_DASH;
|
||||
}
|
||||
|
||||
static void MovePlayerAvatarUsingKeypadInput(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
|
|
@ -517,7 +517,7 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
|||
PlayerRunSlow(direction);
|
||||
else
|
||||
PlayerRun(direction);
|
||||
gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_WATERING;
|
||||
gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_DASH;
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
@ -1228,7 +1228,7 @@ void ClearPlayerAvatarInfo(void)
|
|||
|
||||
void SetPlayerAvatarStateMask(u8 flags)
|
||||
{
|
||||
gPlayerAvatar.flags &= (PLAYER_AVATAR_FLAG_WATERING | PLAYER_AVATAR_FLAG_FISHING | PLAYER_AVATAR_FLAG_FIELD_MOVE);
|
||||
gPlayerAvatar.flags &= (PLAYER_AVATAR_FLAG_DASH | PLAYER_AVATAR_FLAG_FISHING | PLAYER_AVATAR_FLAG_FIELD_MOVE);
|
||||
gPlayerAvatar.flags |= flags;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user