Skip to content

Commit

Permalink
small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shachar700 committed Jan 28, 2025
1 parent b192d12 commit 4014f21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -7189,7 +7189,7 @@ static void Cmd_forcerandomswitch(void)
s32 battler2PartyId = 0;

s32 firstMonId;
s32 lastMonId = 0; // + 1
s32 lastMonId = 0;
s32 monsCount;
struct Pokemon *party = NULL;
s32 validMons = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/battle_util2.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ void SwitchPartyOrderInGameMulti(u8 battlerId, u8 arg1)
{
s32 i;
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders));
gBattlePartyCurrentOrder[i] = *(i + (u8 *)(gBattleStruct->battlerPartyOrders));

SwitchPartyMonSlots(GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId]), GetPartyIdFromBattlePartyId(arg1));

for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
*(0 * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
*(i + (u8 *)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
}
}

Expand Down

0 comments on commit 4014f21

Please sign in to comment.