Skip to content

Commit

Permalink
fix battle script clearing specialBattleType (#4536)
Browse files Browse the repository at this point in the history
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
  • Loading branch information
ghoulslash and ghoulslash committed May 9, 2024
1 parent f12773d commit e122ba2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e122ba2

Please sign in to comment.