diff options
author | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-03-10 22:29:52 -0500 |
---|---|---|
committer | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-03-10 22:33:13 -0500 |
commit | ddb9c518ec401262c85af61ab2ee385863d03ca4 (patch) | |
tree | dba52f03a56913f458c27130078570061afca862 /src | |
parent | cc4053130f1d9d0bb36c78bd39b0b07e96064f5e (diff) |
Decomped ResetAction()
Diffstat (limited to 'src')
-rw-r--r-- | src/dungeon_action.c | 7 | ||||
-rw-r--r-- | src/dungeon_ai_attack.c | 2 | ||||
-rw-r--r-- | src/dungeon_ai_movement.c | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/dungeon_action.c b/src/dungeon_action.c index 9034e4c..912e8b4 100644 --- a/src/dungeon_action.c +++ b/src/dungeon_action.c @@ -5,6 +5,13 @@ #include "dungeon_entity.h" #include "pokemon.h" +void ResetAction(struct DungeonActionContainer *actionPointer) +{ + actionPointer->action = DUNGEON_ACTION_NONE; + actionPointer->actionUseIndex = 0; + actionPointer->unkC = 0; +} + void SetAction(struct DungeonActionContainer *actionPointer, u16 action) { actionPointer->action = action; diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index 6dbefbd..c84aca1 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -760,7 +760,7 @@ s32 WeightMove(struct DungeonEntity *user, s32 targetingFlags, struct DungeonEnt else if (HasIQSkill(user, IQ_SKILL_EXP_GO_GETTER)) { // BUG: expYieldRankings has lower values as the Pokémon's experience yield increases. - // This causes Exp. Go-Getter to prioritizes Pokémon worth less experience + // This causes Exp. Go-Getter to prioritize Pokémon worth less experience // instead of Pokémon worth more experience. weight = gDungeonGlobalData->expYieldRankings[targetData->entityID]; } diff --git a/src/dungeon_ai_movement.c b/src/dungeon_ai_movement.c index 49609d7..326913a 100644 --- a/src/dungeon_ai_movement.c +++ b/src/dungeon_ai_movement.c @@ -28,7 +28,6 @@ extern char *gPtrItsaMonsterHouseMessage; extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*); extern void SetMessageArgument(char[], struct DungeonEntity*, u32); -extern void ResetAction(u16*); extern void MoveIfPossible(struct DungeonEntity*, bool8); extern u8 sub_8044B28(void); extern void sub_807AB38(struct DungeonEntity *, u32); @@ -206,7 +205,7 @@ void DecideAction(struct DungeonEntity *pokemon) } } } - ResetAction(&pokemonData->action.action); + ResetAction(&pokemonData->action); if (pokemonData->clientType == CLIENT_TYPE_CLIENT) { SetWalkAction(&pokemonData->action, pokemonData->entityID); |