Nonmatching resoltuion

- Fix fakematch in Cmd_get_used_held_item
- Remove `static` overrides in MODERN in four objects
This commit is contained in:
PikalaxALT
2021-03-12 13:55:07 -05:00
parent 6c297d19e8
commit e6b1b97aa1
5 changed files with 1 additions and 18 deletions

View File

@@ -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;
}