mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 11:43:37 +01:00
Remove Mimikyu check from loop
More efficient than checking in each loop iteration.
This commit is contained in:
parent
90fdb74ccb
commit
d2d7b6ffef
@ -8341,14 +8341,14 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut)
|
||||
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
||||
};
|
||||
|
||||
currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL);
|
||||
for (i = 0; i < ARRAY_COUNT(species); i++)
|
||||
{
|
||||
if (i == 0 && isSwitchingOut)
|
||||
{
|
||||
i++; // Don't revert Mimikyu Busted when switching out
|
||||
}
|
||||
if (isSwitchingOut) // Don't revert Mimikyu Busted when switching out
|
||||
i = 1;
|
||||
else
|
||||
i = 0;
|
||||
|
||||
currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL);
|
||||
for (; i < ARRAY_COUNT(species); i++)
|
||||
{
|
||||
if (currSpecies == species[i][0])
|
||||
{
|
||||
SetMonData(&party[monId], MON_DATA_SPECIES, &species[i][1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user