Skip to content

Commit

Permalink
Removed pointless for loop in CB2_InitBattleInternal (#3422)
Browse files Browse the repository at this point in the history
  • Loading branch information
LOuroboros committed Oct 14, 2023
1 parent 3409869 commit 0f979ac
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,11 @@ static void CB2_InitBattleInternal(void)
gSaveBlock2Ptr->frontier.disableRecordBattle = FALSE;

for (i = 0; i < PARTY_SIZE; i++)
{
AdjustFriendship(&gPlayerParty[i], FRIENDSHIP_EVENT_LEAGUE_BATTLE);

// Apply party-wide start-of-battle form changes
for (i = 0; i < PARTY_SIZE; i++)
{
// Player's side
// Apply party-wide start-of-battle form changes for both sides.
TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BEGIN_BATTLE);
// Opponent's side
TryFormChange(i, B_SIDE_OPPONENT, FORM_CHANGE_BEGIN_BATTLE);
}

Expand Down

0 comments on commit 0f979ac

Please sign in to comment.