fix an oversight that caused battles to continuesly be double battles (#2894)

This commit is contained in:
Jaizu 2023-04-09 18:23:52 +02:00 committed by GitHub
commit 1df10886b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2109,7 +2109,13 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
return 0;
retVal = CreateNPCTrainerPartyFromTrainer(party, &gTrainers[trainerNum], firstTrainer, gBattleTypeFlags);
gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle;
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER
| BATTLE_TYPE_EREADER_TRAINER
| BATTLE_TYPE_TRAINER_HILL)))
{
gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle;
}
return retVal;
}
void VBlankCB_Battle(void)