summaryrefslogtreecommitdiff
path: root/src/battle_ai_script_commands.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-03-12 13:55:07 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2021-03-12 13:55:07 -0500
commite6b1b97aa12ae683afbaa5b46cb27b8cdbe1448e (patch)
tree7263d3ba3860bda717808dd59766963b6591d444 /src/battle_ai_script_commands.c
parent6c297d19e85b08c09e43b69ef5cb138f4a9880eb (diff)
Nonmatching resoltuion
- Fix fakematch in Cmd_get_used_held_item - Remove `static` overrides in MODERN in four objects
Diffstat (limited to 'src/battle_ai_script_commands.c')
-rw-r--r--src/battle_ai_script_commands.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c
index 8dc939919..9fdd4d0c3 100644
--- a/src/battle_ai_script_commands.c
+++ b/src/battle_ai_script_commands.c
@@ -2089,12 +2089,7 @@ static void Cmd_get_used_held_item(void)
else
battlerId = gBattlerTarget;
- // This is likely a leftover from Ruby's code and its ugly ewram access.
- #ifdef NONMATCHING
- AI_THINKING_STRUCT->funcResult = gBattleStruct->usedHeldItems[battlerId];
- #else
- AI_THINKING_STRUCT->funcResult = *(u8*)((u8*)(gBattleStruct) + offsetof(struct BattleStruct, usedHeldItems) + (battlerId * 2));
- #endif // NONMATCHING
+ AI_THINKING_STRUCT->funcResult = *(u8 *)&gBattleStruct->usedHeldItems[battlerId];
gAIScriptPtr += 2;
}