diff options
author | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-02-13 22:02:17 -0500 |
---|---|---|
committer | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-02-13 22:02:17 -0500 |
commit | a02346be01efa13b6d969a89be642e3450f7ca35 (patch) | |
tree | fdd3798a122f814186b404e6e18f9af320ed76b1 /src/dungeon_ai_items.c | |
parent | 9939c543ce7a8cbf7abb85d3125b5e6d95204433 (diff) |
Decomped FindMoveTarget()
Diffstat (limited to 'src/dungeon_ai_items.c')
-rw-r--r-- | src/dungeon_ai_items.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dungeon_ai_items.c b/src/dungeon_ai_items.c index 2b1bb71..5e60708 100644 --- a/src/dungeon_ai_items.c +++ b/src/dungeon_ai_items.c @@ -40,7 +40,7 @@ extern void sub_8077274(struct DungeonEntity *, struct DungeonEntity *); extern s32 gNumPotentialTargets; extern u32 gPotentialTargetWeights[NUM_DIRECTIONS]; -extern u32 gPotentialTargetDirections[NUM_DIRECTIONS]; +extern u32 gPotentialItemTargetDirections[NUM_DIRECTIONS]; extern bool8 gTargetAhead[NUM_DIRECTIONS]; extern struct TeamInventory *gTeamInventory_203B460; @@ -101,7 +101,7 @@ void DecideUseItem(struct DungeonEntity *pokemon) pokemonData->action.actionUseIndex = selectedToolboxIndex; pokemonData->action.lastItemThrowPosition.x = pokemon->posWorld.x; pokemonData->action.lastItemThrowPosition.y = pokemon->posWorld.y; - pokemonData->action.facingDir = gPotentialTargetDirections[targetIndex] & DIRECTION_MASK; + pokemonData->action.facingDir = gPotentialItemTargetDirections[targetIndex] & DIRECTION_MASK; break; } } @@ -261,7 +261,7 @@ void DecideUseItem(struct DungeonEntity *pokemon) pokemonData->action.actionUseIndex = selectedToolboxIndex; pokemonData->action.lastItemThrowPosition.x = pokemon->posWorld.x; pokemonData->action.lastItemThrowPosition.y = pokemon->posWorld.y; - pokemonData->action.facingDir = gPotentialTargetDirections[targetIndex] & DIRECTION_MASK; + pokemonData->action.facingDir = gPotentialItemTargetDirections[targetIndex] & DIRECTION_MASK; return; } } @@ -421,7 +421,7 @@ void TargetThrownItem(struct DungeonEntity *pokemon, struct DungeonEntity *targe u32 itemWeight; u32 *targetWeight; gTargetAhead[targetDirection] = TRUE; - gPotentialTargetDirections[gNumPotentialTargets] = targetDirection; + gPotentialItemTargetDirections[gNumPotentialTargets] = targetDirection; targetWeight = &gPotentialTargetWeights[gNumPotentialTargets]; itemWeight = !ignoreRollChance ? EvaluateItem(targetPokemon, item, targetingFlags) : 100; *targetWeight = itemWeight; |