fix battle script clearing specialBattleType (#4536)

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
ghoulslash 2024-05-09 10:22:46 -04:00 committed by GitHub
parent f12773dbb8
commit e122ba28be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3254,11 +3254,13 @@ static void ClearSetBScriptingStruct(void)
{
// windowsType is set up earlier in BattleInitBgsAndWindows, so we need to save the value
u32 temp = gBattleScripting.windowsType;
u32 specialBattleType = gBattleScripting.specialTrainerBattleType;
memset(&gBattleScripting, 0, sizeof(gBattleScripting));
gBattleScripting.windowsType = temp;
gBattleScripting.battleStyle = gSaveBlock2Ptr->optionsBattleStyle;
gBattleScripting.expOnCatch = (B_EXP_CATCH >= GEN_6);
gBattleScripting.specialTrainerBattleType = specialBattleType;
}
static void BattleStartClearSetData(void)